THE SYSTEM USER GUIDE

Copyright LTD 1982 29 November 1982 403,100 Issue 1 Obligatory safety instructions for inclusion in the Econet documentation to cover; the BBC with a three core moulded plug, the System 5 with a three core conventional plug and a clock/terminator with a two core plug, should read as follows:

WARNING: Systems 2, 3, 4 and 5 and the BBC Microcomputer must be earthed.

IMPORTANT: The wires in the mains lead for the System 5 computer and the BBC Microcomputer are coloured in accordance with the following code: Green and Yellow - Earth

Blue - Neutral

Brown - Live As the colours of the wires in the mains lead of this apparatus may not correspond with the coloured markings identifying the terminals in your plug, proceed as follows: The wire which is coloured green and yellow must be connected to the terminal in the plug which is marked by the letter E or by the safety earth symbol or coloured green or green and yellow. The wire which is coloured blue must be connected to the terminal which is marked with the letter N or coloured black. The wire which is coloured brown must be connected to the terminal which is marked with the letter L or coloured red. In the case of apparatus supplied with a moulded plug, please note the following:

If the socket outlet available is not suitable for the plug supplied, the plug should be cut off and the appropriate plug fitted and wired as previously noted. The moulded plug which was cut off should be disposed of as it would be a potential shock hazard if it were to be plugged in with the cut off end of the mains cord exposed. The moulded plug must be used with the fuse and the fuse carrier firmly in place. The fuse carrier is of the same colour as the coloured insert in the base of the plug. Different manufacturers plugs and fuse carriers are not interchangeable. In the event of loss of the fuse carrier, the moulded plug MUST NOT be used. Either replace the moulded plug with another conventional plug wired as previously described, or obtain a replacement fuse carrier from an authorised Acorn or BBC Microcomputer dealer.

not necessarily the same shade of that colour.

iii IMPORTANT:IntroductionThe wires in the mains lead for the mains adaptor for 1 the or the Econet Clock or the Econet Termination accessories are coloured in accordance with the following code: Blue - Neutral

Brown - Live

As the colours of the wires may not correspond with the coloured markings identifying the terminals in your plug, proceed as follows: The wire which is coloured Blue must be connected to the terminal which is marked with the letter N or coloured black. The wire which is coloured Brown must be connected to the terminal which is marked with the letter L or coloured red. IMPORTANT: In the event of the fuse blowing, it should be replaced after clearing any fault, with a 3 Amp fuse that is ASTA approved to BS1362.

C.B. Turner 3.12.82

iii 1 Getting going 2 1.1 Initialising the ECONET software 1.1.1 -On the BBC Microcomputer 1.1.2 -On the Atom 1.1.3 -On the Acorn Systems 3, 4, 5 1.1.4 The No Clock message 1.1.5 What next?

2 The file server 7 2.1 What is the file server? 2.1.1 Purpose of this chapter 2.1.2 Not starting the file server! 2.2 Simple file server commands 2.2.1 A single directory 2.2.2 Commands 2.2.3 Identifying yourself 2.2.4 SAVE 2.2.5 SAVE 2.2.6 LOAD 2.2.7 LOAD 2.2.8 Listing the directory - CAT 2.2.9 File information - INFO 2.2.10 EX/INF 2.2.11 DELETE 2.2.12 RENAME 2.2.13 File access - ACCESS 2.2.14 A note on file titles 2.2.15 Multiple file servers 2.2.16 Monitor messages 2.2.17 Summary 2.3 Creating and using a hierarchy of directories 2.3.1 Directories within directories 2.3.2 Creating directories 2.3.3 Filenames 2.3.4 Selecting directories 2.3.5 The ROOT directory and USERS ROOT directory 2.3.6 Selecting discs 2.3.7 Deleting directories 2.4 Owner and public access 2.4.1 Whats the difference? 2.4.2 Becoming the owner 2.5 Passwords 2.5.1 How they are used 2.5.2 Setting the password - PASS 2.5.3 The password file 2.6 User commands and libraries 2.6.1 Commands 2.6.2 Libraries 2.6.3 RUN and / 2.7 EXEC and SPOOL 2.7.1 EXEC 2.7.2 SPOOL 2.8 Auto-start facilities 2.8.1 SettingIntroduction option 1 2.8.2 Auto-start when logging on 2.8.3 Auto-start when resetting the machine 2.9 Utility programs 2.9.1 Bow to use them 2.9.2 INF 2.9.3 DISCS 2.9.4 USERS 2.9.5 Network utilities 2.9.6 PS 2.10 Random access 2.10.1 What is random access? 2.10.2 Channels - Opening and closing files 2.10.3 Random access in BASIC 2.10.4 Using the pointer 2.10.5 Interlocks 3 Using the File Server from Assembler 34

3.1 OSFIND 3.2 OSFILE 3.3 OSARGS 3.4 OSBGBP 3.5 OSBGET 3.6 OSBPUT

4 The printer server and printing 4O

4.1 What is the printer server? 4.1.1 Using a BBC Microcomputer printer server 4.1.2 Using an ATOM printer server 4.2 Printing from a station 4.3 Several printer servers

5 Communicating with other User Stations 42 5.1 Introduction 5.2 VIEW 5.3 REMOTE 5.4 ESCAPE and BREAK in REMOTE 5.4.1 On BBC 5.4.2 On ATOMs and Systems 5.5 ROFF 5.6 NOTIFY 5.7 Protection 5.7.1 PROT 5.7.2 UNPROT

6 Errors 47

6.1 Errors on the BBC Microcomputer 6.1.1 Error messages 6.1.2 OSWORD call to read error numbers 6.1.3 Line jammed 6.1.4 Net error 6.1.5 No clock 6.1.6 Bad TXCB 6.2 Errors on the ATOM and Systems 6.2.1 Error messages 6.3 Errors common to all machines 6.3.1 NOT LISTENING 6.3.2 NO REPLY 6.3.3 Channel 6.4 List of Errors

7 Supervising the network 51

7.1 General principles 7.2 Hardware requirements 7.2.1 A useful file server configuration 7.3 Discs provided 7.3.1 File server and DOS discs not compatible 7.3.2 The NETWORK UTILITIES DISC 7.3.3 The FILE SERVER MASTER DISC 7.3.4 Disc care and handling 7.4 Starting the file server program 7.4.1 Basic steps 7.4.2 Routine starting procedure 7.4.3 File Server Monitor 7.5 Initialising file server discs 7.5.1 Why necessary? 7.5.2 Formatting the disc 7.5.3 Initialising the disc maps 7.5.4 Creating the ROOT and PASSWORD file 7.6 Managing the password file 7.6.1 Forgotten passwords 7.7 Privileged users - setting privilege 7.7.1 The user SYST 7.7.2 Creating and deleting users 7.8 Changing discs 7.9 Copying from DOS discs 7.10 ARCHIVING! - Data security 7.10.1 Backup routines 7.10.2 Copying on the BBC Microcomputer file server 7.10.3 Copying on the system file server 8 Installing an ECONET network 64

8.1 Items required 8.1.1 Terminators 8.1.2 Clock 8.1.3 Cable 8.1.4 Sockets 8.1.5 Suppliers 8.2 Installing a network 8.3 Setting up the network 8.4 Fault diagnosis

9 Selecting a filing system 73

vii 9.1 On the BBC Microcomputer 9.2 On Systems 9.3 On the ATOM

10 Econet primitives 74

10.1 Introduction 10.2 TRANSMIT 10.2.1 Purpose 10.2.2 The TRANSMIT control block 10.2.3 Return from TRANSMIT 10.3 RECEIVING messages 10.3.1 Introduction 10.3.2 The RECEIVE CONTROL BLOCK 10.3.3 The Receive Control Block after reception 10.4 Broadcast 10.5 Immediate operations 10.5.1 Introduction 10.5.2 PEEK 10.5.3 POKE 10.5.4 Remote subroutine JMP 10.5.5 Remote procedure call 10.5.6 Machine type (Local PEEK) 10.5.7 HALT 10.5.8 CONTINUE 10.6 Protection

11 The BBC Microcomputer interface 89

11.1 Introduction 11.2 TRANSMIT 11.2.1 Calling TRANSMIT 11.2.2 Polling the TRANSMIT block 11.3 RECEIVE 11.3.1 Opening a control block 11.3.2 Polling a receive block 11.3.3 Reading a receive block 11.3.4 Deleting a receive block 11.4 Immediate operations 11.5 Remote Subroutine Jump 11.6 Remote procedure call 11.6.1 Operating system procedure call 11.7 Protection 11.8 Other OSWORD calls 11.8.1 Reading and Setting State Information 11.8.2 File Server/Remote Machine Call 11.9 Other OSBYTE calls 11.9.1 Switching a REMOTE off from within REMOTE

12 The ATOM and System operating system interface 95

12.1 Introduction 12.2 Calling TRANSMIT 12.3 Receiving

vii 12.4 Immediate commands 12.5 Remote Subroutine Jump 12.6 Remote Procedure call 12.6.1 Operating system procedure call 12.7 Protection 12.8 Memory allooation 12.8.1 Page zero 12.8.2 Page two 12.8.3 Other locations

13 The file server interface 99

13.1 Introduction 13.2 The user environment - Handles 13.3 Definitions 13.4 Command line decoding 13.5 Simple commands 13.6 SAVE 13.7 LOAD 13.8 Other command line operations 13.9 Other functions 13.9.1 Save - code 1 13.9.2 Load - code 2 13.9.3 Examine - code 3 13.9.3.1 ARG = 0 13.9.3.2 ARG = 1 13.9.3.3 ARG = 2 13.9.3.4 ARG = 3 13.9.4 Catalogue header -code 4 13.9.5 Load as command - code 5 13.9.6 Find (OPEN) - code 6 13.9.7 Shut (CLOSE) - code 7 13.9.8 Get byte - code 8 13.9.9 Put byte - code 9 13.9.10 Get bytes and Put bytes - codes 10 and 11 13.9.11 Read random access info - code 12 13.9. 12 Set random access info - code 13 13.9.13 Read disc info - code 14 13.9.14 Read logged on users - code 15 13.9.15 Read date and time - code 16 13.9.16 Read "end of file" status - code 17 13.9.17 Read object info - code 18 13.9.18 Set file info - code 19 13.9.19 Delete object - code 20 13.9.20 Read user environment - code 21 13.9.21 Set user option - code 22 13.9.22 Log off - code 23 13.9.23 Read user info - code 24 13.9.24 Read File Server version number - code 25 Appendices

A Overview of the file server 114 B Command summary and abbreviations 115 C Error numbers 116 D BBC Microcomputer Machine operating system calls 118

9 Introduction

The ECONET is a low cost capable of linking many computers together so that they can share information and resources. It has been designed for use with all Acorn Computers, and forms a valuable extension to the BBC Microcomputer System. In addition to low-level communication, the Econet provides a and a printing service which can be shared by all machines attatched to the network. This manual describes the user commands and facilities provided by the network itself, the Acorn File Server and the Acorn Printer Servers. The early chapters are intended to help you understand the and start using the network as soon as possible. More technical information about the network and how it should be installed and maintained is provided in later chapters. In addition to this manual, the following documents are available: The Econet Reference Card - a summary of network user facilities The BBC Machine Printer Server Manual The Model B File Server Manual The Econet Technical Manual The Econet Installation Leaflet The information in the Econet Installation Leaflet is also contained in Chapter 8 of this manual, and should be read before attempting to install an Econet System.

Notes of errors and suggestions for improvement will be gratefully received. Comments should be sent to: Technical Documentation Department Acorn Computers Ltd Fulbourn Road Cherry Hinton Cambridge CB1 4JN

10 1 Getting going To get plugged into the Econet network you must have a computer suitably equipped as a user-station. At the moment, three types of computer can be connected to the network as a user-station. These are the BBC Microcomputer, the Acorn ATOM, and the Acorn Systems 3, 4 and 5. Whichever computer you use, it must be modified before using it with the Econet system. You may buy your computer already modifed (BBC Microcomputer models ANA 02, ANB 02 and ANB 04 are supplied complete with an Econet interface) or you may have it up-graded by your dealer. In either case, a computer for use as an Econet station must have the following: Econet interface hardware. A 5 pin din connector. A copy of the Econet Version III software. (Usually provided in an 8K EPROM for the BBC Microcomputer or a 4K EPROM for the Atom). To get going you will need a monitor or television to use with the computer. Plug in and switch on the computer, plug the TV or monitor into the computer and switch that on also. Plug the 5 pin DIN connector from the computer into an Econet socket. The pictures overleaf may help you get these bits and pieces sorted out. Obviously, you will need a network to plug in your station. Details on how to install a network are given in Chapter 8.

2 Figure 1.1 Plugging in a user station

12 1.1 Initialising the ECONET software

Once you have successfully connected your computer to the electrical supply and the network socket, it is necessary to start the ECONET software. This is done differently for each of the three types of user station so the next three sections tell you what to do for each machine. In addition, each machine can be started in a number of ways.

1.1.1 On the BBC Microcomputer

If on power-up either of the two following messages appears, then your computer has already automatically selected the Econet filing system. BBC Computer 32K

Econet station nnn

BASIC or

BBC Computer 32K

Econet station nnn No Clock

BASIC

The second is the No Clock message. It is not necessarily a serious problem. Section 1.1.4 tells you what to do.

If neither of these messages appears, then you will have to select the Econet system. This you can do by typing N BREAK, holding both keys down together, or CTRL N BREAK, holding all three keys down together. Alternatively you can type NET

If you use one of the methods involving resetting the machine ( pressing the BREAK key), you should obtain one of the two messages shown above. If you use the NET command no special message will appear.

NOTE- WELCOME TAPE If you wish to use the cassette filing system, for example to use the WELCOME tape, you must first do one of the following:

Either type

TAPE

or press SPACE BREAK (holding both keys down together) or press DELETE 13 BREAK (holding both keys down together). You can now continue as on page 11 of the BBC Microcomputer User Guide. If you later want to use any of the facilities of the Econet system you will have to select it b y one of the methods described above. This procedure is necessary because the BBC microcomputer can only deal with one filing system at a time and both the Econet and cassette systems are filing systems ( TAPE and NET select different filing systems - see Chapter 9).

1.1.2 - On the Atom

When you think you have connected everything together properly press BREAK on the keyboard of your computer. If everything is working you should get a message on the screen which looks something like this:-

ACORN ATOM ECONET 3.1A 235

Release/Version Number Station number

If all is not quite well you might get this message:

ACORN ATOM ECONET 3.1A NOCLK 235 )

Stands for No Clock

Section 1.1.4 tells you what to do if you get this No Clock message.

1.1.3 - On the Acorn Systems 3, 4 and 5

The System computers will not initialise the ECONET when you press BREAK. You need to make the computer jump to the first line of executable code in the ECONET software. This is accomplished by typing: GO E003 (Starts the software allowing communication over the network.)

After typing this you should get the message

Econet 3.10 NOS V.IIIA

You may probably also want to type one of the following: GO E000 (Enables just the network and returns "Econet 3.10") GO E009 (Enables the local disc filing system in the station and the network printer)

1.1.4 The No Clock message

14 This means that although your computer is switched on and contains the necessary hardware to connect to the network, a valid clock signal cannot be detected. There are two major reasons why you might get this problem. Number one is that you might have forgotten to plug your computer into the network with the 5 pin DIN plug. Easily remedied - plug it in and start again. Failing that, move on to major reason number two. There is no clock generator connected to the network to generate the clock signal. (One and only one clock generator must be connected to the network to do this). Seek out the person in charge of your network and ask for a clock signal. Probably you will not be the first person to ask as the absence of a clock signal will prevent everyone from using the network.

1.1.5 What next? Let us assume that you managed to connect to the network without a hitch. The cursor will be positioned directly after the > prompt for BASIC. You can now enter a program or type commands to make use of the network facilities. The most useful facility now available to you is the File Server. Chapter 2 tells you all about it.

15 2 The file server

2.1 What is the file server?

The file server is a machine code program written to run on an Acorn System 3, 4 or 5 computer or the BBC Microcomputer with a second 6502 processor and a disc system. It provides a disc file system which can be shared by the stations connected to the network. Common access to the disc drive(s) allows any authorised user to store and retrieve information.

The system supports a hierarchical directory structure, each user has as many directories as he requires. Simple protection facilities are provided to ensure that one users files can be protected from both other users and himself.

2.1.1 Purpose of this chapter

This chapter gives a complete description of the facilities provided by the file server. It starts with the simplest form of use and Introduces more complex operations in later sections. It is intended to be an instructional section rather than a reference manual or technical description. Accordingly, lists of error messages, syntax definitions etc. have been confined to later chapters. To find out how to use the file server simply to load and save files, it is suggested that you start at section 2.2, which gives a simple introduction to using files over the network. Section 2.3 introduces the idea of multiple directories, and further sections gradually deal with more complex features such as file security and library commands. Chapter 7 describes how to start and maintain the file server itself. This chapter is provided for the people responsible for running the file server, making sure the correct discs are available, and generally maintaining the file server for other users. Readers who are familiar with using filing systems and in particular hierarchical systems such as UNIX or TRIPOS may find that Appendix A gives a general introduction to the system sufficient to allow them to bypass some of the earlier sections. Details of how to use other facilities of the ECONET such as printer servers, the NOTIFY command etc. are covered in chapters 4 and 5.

2.1.2 Not starting the file server! The person in charge of the network usually starts the file server, so you dont have to. You can immediately start using the file server and if you are a registered user you can create files and directories of your own. If you ARE the person in charge of the network and you want to find out how to start the file server, read chapter 7.

16 2.2 Simple File Commands

2.2.1 A single directory

Although the file server supports a multi-directory file structure, it can be used in its simplest form just to store a list of files. This section describes the use of simple commands to save, load and inspect files in a single directory.

2.2.2 Commands

File server commands are identified by preceding them with a "" character. This distinguishes them from, for example, BASIC commands, PASCAL commands, or commands relating to a particular application program (e.g. an editor or assembler).

Commands can be used in BASIC programs (see section 5.2 for an example) and can be shortened by the "." character (see appendix B for abbreviations). If the File Server does not recognise a command, the message "Bad command" will be displayed and an error will occur.

2.2.3 Identifying Yourself

Before the file server can deal with file commands being sent to it from a station on the ECONET, it must know who is using that station. So the first thing to do before using files on the ECONET is to identify yourself. Each user has an identifier. Each identifier can be up to ten characters in length and must start with a letter. The user must remember his identifier which he sends to the file server using the I AM command. e.g. I AM ALEXANDER

ALEXANDER is now in communication with the file server.

This process of identification is known as "logging on" and will be refered to at various places in this manual.

2.2.4 SAVE

SAVE is a BASIC command which saves the current BASIC program text as a file. e.g.

SAVE "MYPROG" saves the current BASIC program as a file which belongs to the user who is logged on at this station.

2.2.5 SAVE

17 •SAVE saves an area of memory as a file. e.g.

SAVE MYDATA 3000+500 saves the area of memory from 3000 to 3500 as a file called MYDATA, owned by this station. In this case 3000 was the start address of the area in memory, 500 was its length. An alternative format for the command is: SAVE MYDATA 3000 3500 where 3000 is the start address as before, but the second parameter is the finish address of the section of memory you want to save, in this case 3500. This command is useful for saving machine code programs or data. It is also possible to specify a third parameter to a SAVE. This is the address where execution will start if the file is loaded as an executable command (see section 2.6.1). e.g.

SAVE BASIC C000+1000 C2B2 saves a machine code file which will be executed at C2B2 if loaded as a command.

The execution address can be left out of the command, in which case it defaults to the load address.

A fourth parameter may be specified which will be the address at which the file is loaded back (if this is to be different to the start address). For example:

SAVE PROG 3000 3500 5050 5000 will save a block of memory from 3000 to 3500. If the file is loaded it will be loaded at 5000 and the execution address if it is loaded as a command will be 5050. The load address parameter is optional. If it is to be specified, the execution address must also be explicitly given when the file is saved. 2.2.6 LOAD LOAD is a BASIC command which loads a file as a BASIC program. e.g.

LOAD "MATHS" loads a BASIC program called MATHS.

2.2.7 LOAD LOAD loads a file into a particular area of memory. e.g.

LOAD MYDATA will load the file MYDATA at the load address of that file. This address is either the start address given when the file was saved, or the load address if this was, specified (the fourth parameter of the SAVE command). 18 LOAD MYDATA 3200 will load MYDATA at location 3200.

2.2.8 Listing, Your Directory - CAT The CAT command provides a list (catalogue) of the files you have saved. A list (or set) of files in a filing system is known as a DIRECTORY, and each file is known as an ENTRY in the directory. (It is also possible to create directories as directory entries. This is dealt with in section 2.3). After the first three lines, the files are listed in alphabetic order, one per line with the access rights (see section 2.2.13) following each name. e.g. MATHS LR/ MYPROG WR/R

If no files are listed, the directory is empty (you have not saved any files). The first three lines contain information which is explained in detail later in this manual. The top line starts with the name of the directory being displayed. After this is the cycle number (which changes each time an entry is deleted or created) and then the word Owner or Public according to your access rights to this directory. The second line has the disc title and the auto-start option (see section 2.8). The third line shows the name of your currently selected directory and the name of the directory currently selected as the library.

DIRNAME (33) Owner THEDISCTITLE Option 0 (Off) Dir. CSDNAME Lib. LIBNAME

MATHS LR/ MYPROG WR/R

The meaning of ownership of a directory is dealt with in detail in section 2.4, but in the simple case you will always own your directory.

2.2.9 File Information - INFO INFO prints a list of information about a particular file. e.g.

INFO MATHS produces a string of information about the file MATHS. The format is:

19 The information may be split onto more than one line if the screen mode in use does not allow enough characters across the screen. For example in mode 7 (on the BBC computer) the information for a typical BASIC program might be: MATHS WR/R FFFF1200 FFFF801F 00044A 16:09:82 000450

The date is the date the file was last saved, and the System Internal Name (SIN) is the start sector of the file on the disc.

2.2.10 EX/INF

This is a program held in the Econet ROM on the BBC Microcomputer ( EX) and on the file server disc for ATOMs and Systems (INF). The command will cause the computer to do a INFO for all the files in the specified or current directory. A typical listing might be: DIRNAME (33) Owner THEDISCTITLE Option 0 (Off) Dir. CSDNAME Lib. LIBNAME

MATHS LR/ FFFF1200 FFFF801F 00044A 21:7:82 000450 MYPROG LR/R FFFF2900 FFFF2900 000351 13:7:82 00005D MYDATA LR/ FFFF1800 FFFF801F 000500 15:7:82 000043 PASCAL DL/ 00000000 00000000 000200 10:5:81 000075 where PASCAL is a directory (see section 2.3)

2.2.11 DELETE Simply deletes a file from the directory. e.g

DELETE MATHS

Once deleted a file cannot be restored. Locked files cannot be deleted and the message Entry locked is displayed if you try. You can only delete files in directories which you own.

2.2.12 RENAME This command changes the name of a file. For example:

RENAME OLDFILE NEWFILE changes the name of file "OLDFILE" to "NEWFILE". You can only rename files (not directories), you cant rename locked files and you cant rename across discs. You can rename a file and change its directory ( provided you have sufficient access). For example you can use something like:

20 RENAME A.OLDNAME B.NEWNAME which will move file "OLDNAME" in directory A and place it in directory B under the name "NEWNAME".

2.2.13 File Access - ACCESS

Many people will use a single file server, and you may want to protect important files from both other users and from accidents such as saving a data file into a program file or deleting an important program. It is therefore possible to set the ACCESS STRING for a file. e.g.

ACCESS MATHS LWR/WR

Each letter in the access string refers to a type of access to the file:

L - locked => the file cannot be deleted or overwritten. W - write => the file can be written to R - read => the file can be read.

The "/" character separates the OWNERS access (on the left) from PUBLIC access (on the right). So in the example, MATHS can be read and updated by both the owner and anybody else using the system.

If any character is not present in the string, the access it represents is taken to be unset. So:

ACCESS MATHS LR/ sets MATHS to be locked and readable only by the owner.

ACCESS MATHS sets MATHS to be unlocked and accessible by nobody.

When a file is saved, the access is set to a default of WR/.

Owner and public access is described more fully in section 2.4, but for simple use it is safe to assume that you own the files you have saved, and everybody else has only public access to them.

NOTE When a file is saved, the file server acts as though a new file is being created, and the old one, if present, is deleted. Thus you should protect against accidental saving with the LOCK character, not the WRITE character. Other people can never save into your files, whether they are locked or not (see section 2.4), unless they are system privileged (see section 7.7). The WRITE character refers to random access files (see section 2.10).

2.2.14 A Note on File Titles

File titles must be at least one character and up to ten characters 21 and can include upper and lower case alphabetic characters, numerics and the following punctuation symbols: ":"

MOTS "." and ":" have special meanings explained in section 2.3. Upper and lower case alphabetic characters are not distinguished. Thus " MATHS", "MaThS" and "maths" are all the same file name.

2.2.15 Multiple File Servers

All file server commands are addressed to a station number on the ECONET by the ECONET software. This station number is stored by the operating system, and is set by default to 254. If you wish to log on to a file server with a different number, type:

I AM 234 JOEY where 234 is the station number of another file server.

From that point on, all file server commands will be sent to station 234, unless you press CTRL and BREAK together. (Just BREAK on the Atom and System computers). When this happens, you remain logged on, but the station number reverts to 254, and it is neccessary to reset it, either by logging on again, or by directly changing the file server number at its location in your stations memory. On the BBC machine this is done by calling the appropriate OSWORD routine, on Atoms and Systems by poking the relevant memory locations. Full details are provided in Chapters 11 and 12. A soft reset (just BREAK) on the BBC Microcomputer does not reset the number of the selected file server. The ECONET can easily support several file servers, which have different numbers. They operate quite independently of each other, and one user can be logged on from one station to as many as required. This requires a knowledge of the operating system interface routines ( Chapters 11 and 12) and some understanding of the file server interface (Chapter 13). In particular it should be noted that the three user environment handles returned by each file server are unique to the file server that returned them. Thus when the file server number is changed, these handles must also be changed to the ones produced by the new file server. A single user can be logged on to the same file server from any number of stations, as the file server identifies people by their user identifier, not station number. The only limitation is the ability of the user to remember where he is logged on to what.

2.2.16 Monitor messages

The command OPT1 is used to set the "message switch" which controls the details of a message displayed whenever a file is loaded or saved.

OPT1,0 implies no messages are issued. OPT1,1 gives detailed information including load and execution addresses and length.

2.2.1722 Summary So far you have learnt how to use a single directory, save, load, delete and protect your files on it. In doing all this you may have come across some of the systems error messages. These are produced when the file server cannot understand your commands or something on the network is not working properly. All these errors are explained in Chapter 6. Common ones are NOT LISTENING, NO REPLY.

23 2.3. Creating and Using a Hierarchy of Directories

2.3.1 Directories Within Directories

In addition to containing files, a directory may have entries which are themselves directories. This allows any file owner to structure the way in which he keeps his files.

For example, the directory ALEXANDER, in addition to the files mentioned above, could have several directory entries corresponding to several different types of file. Pascal programs could be stored in a directory called PASCAL, and text-edited letters in a directory called LETTERS. The structure can be extended by, for example, creating further directories in LETTERS called MUM, DAD and BUSINESS to keep letters sent to various people. The only limit on the number of directories the system can handle is the amount of space on the disc, so each user can create as large and complex a structure as he thinks he needs to cope with his files. This type of structure, in which a directory can point to a number of directories "below" it, is called a HIERARCHICAL structure or tree structure. (see figure 2.1)

Throughout this section we will continue to use examples assuming that we are logged on as ALEXANDER, and are using the directory ALEXANDER.

2.3.2 Creating Directories The CDIR command creates a directory entry in the same way that SAVE creates a file entry. So:

CDIR PASCAL creates the directory PASCAL as an entry in ALEXANDER. Executing CAT will now list PASCAL as an entry among the files:

PASCAL DL/

The D before the access string indicates that it is a directory, and that its default access is simply "locked". W and R do not have any meaning for a directory. Executing INFO PASCAL gives information very similar to file information, except that the load and execute addresses, which again have no meaning, are zeros.

24 Figure 2.1 A hierarcical file structure

25 2.3.3 File Names

In order to use files from directories other than the current one, directory names and file names can be strung together to make one composite file name. The sections of the name are separated by the "." character and each section corresponds to a level (directory) of the hierarchy. (The only limit to the length of this string of names is the size of the input buffer). For example, with ALEXANDER selected, to access the file STATS1 in directory PASCAL, the title PASCAL.STATS1 is used. The section PASCAL is looked up in ALEXANDER, is found to be a directory, and STATS1 is then looked up in PASCAL. So the command:

SAVE PASCAL.STATS1 3000 +34 saves a file into the directory PASCAL.

The command

CAT PASCAL now lists the directory PASCAL (and shows STATS1 as an entry), and

INFO PASCAL.STATS1 gives us information about the file STATS1 in PASCAL.

Similarly, to load a particular business letter:

LOAD LETTERS.BUSINESS.TOACORN

Each section of a long file title is subject to the rules described in section 2.2.14 (10 characters only etc.).

2.3.4 Selecting Directories

In the examples so far, each time we quoted a file name (in SAVE, CAT etc.), it was looked up in the directory ALEXANDER. This would be inconvenient if we wished to do some work using the PASCAL files, and so it is possible to change the directory in which file names are looked up. The command used is DIR (select directory). e.g DIR PASCAL selects PASCAL as the CURRENTLY SELECTED DIRECTORY (CSD) in which all file names are now looked up. So, the command

LOAD STATS1 loads the Pascal file STATS1 from the directory PASCAL.

Similarly, CAT now produces a list of entries in PASCAL, not ALEXANDER. The first line of CAT also displays the last section of the current directory name, which is now PASCAL.

To return to the directory which was selected when ALEXANDER logged

26 on, the command DIR with no file name can be used.

2.3.5 The ROOT Directory and USERS ROOT Directory

So far we have only been concerned with a single users filing system stemming from a single directory, in this case ALEXANDER. In fact, a disc is itself a large file hierarchy with many users each having a personal sub-system such as the one described above. At the top of the system is a directory called the ROOT which contains a number of directories such as ALEXANDER. Each of these is a USERS ROOT DIRECTORY (URD) and forms the basis of a users personal file structure. The ROOT is referred to using the character "$" and can be incorporated in file titles like any other directory. This now makes it possible to look at and use other users files ( providing you have access - see section 2.4). For example:

CAT $.JOHN gives a catalogue of the directory JOHN in the root directory. This directory is not part of ALEXANDERs system and he only has public access so, for example, he cannot save files or create directories into it. A file title using the root is like any other file title and can therefore be used with any command. e.g.

DIR $.JOHN selects JOHNs directory as our current one (although we still dont have access to his files).

LOAD $.JOHN.BASIC.PROG1 loads one of JOHNs BASIC files. This would only be allowed if JOHN had allowed us READ access to his file.

CAT $ gives a list of the files and directories available in the root directory.

The root is created and put on the disc when the disc is initialised - see chapter 7.

2.3.6 Selecting Discs

A machine running the file server can support several disc drives. Each disc contains a complete filing system as described above, with a root at the top. Each person using the file server has a CURRENTLY SELECTED DISC, which determines which file system he is using. The currently selected disc name is displayed in the second line of a catalogue. The file server selects a disc for a user when he logs on by searching each disc on the system for a directory in the root which is the same as the user identifier. When such a directory is found, that disc becomes the users currently selected disc, and the 27 directory becomes both his users root directory and CSD. If no such directory is found, the disc in the left hand drive becomes the users current disc, and the root of that disc his URD and CSD.

To select a different disc, the SDISC command is used. Discs are identified by name, which is simply quoted after the command:

SDISC "FORM-THREE-MATHS"

If the disc is found, the same procedure for selecting URD and CSD is used as for logging on, and all file operations are interpreted in the new filing system.

It is also possible to temporarily access files on another disc, by quoting the disc name before a file title. (A disc name is distinguished in a file title by preceding it with the ":" character). e.g. CAT ":MATHS-DISC.JOEY.DATA" gives a catalogue of a directory located on a different disc. Once again, this is a general facility, so the following commands are valid:

DIR ":MATHS-DISC.JOEY"

LOAD ":FORM-THREE-MATHS.JOEY.STATS"

NOTE The root does not have to be specified when quoting a disc name (except when dealing with the root explicitly) so the above both refer to $.JOEY on the respective discs. To catalogue the root itself on FORM- THREE-MATHS: CAT ":FORM-THREE-MATHS.$"

2.3.7 Deleting Directories Directories can be deleted using the DELETE command, but ONLY if they themselves do not contain any entries. If you wish to delete a directory and its entire contents, this must be done entry by entry.

28 2.4. Owner and Public Access

2.4.1 Whats the difference? As we have seen, the owner of a directory may create entries in that directory (files or further directories), set the access to entries and has his own access governed by the " owner" field of any access string. If a user is using a directory which he does not own, he has PUBLIC access. This prevents him from creating entries (by saving or CDIR) and limits him to the "public" field of each access string. Also, he cannot set the access string of any entry.

2.4.2 Becoming the Owner If, when a user logs on, a directory is found in the root which matches his user identifier, he is given OWNER access to that directory, and any directories which are entries in that directory (it also becomes his CSD and URD - see 2.3.6). He is therefore owner of his complete directory system. However, he only has PUBLIC access to any directories or files outside that system, and cannot save files into somebody elses directory. e.g. After logging on as ALEXANDER and

executing: CAT $.JOHN the first line of the catalogue will contain the word "Public" after the directory name indicating that ALEXANDER only has public access to that directory. It should be noted that if ALEXANDER refers to his own files through the root, he will be treated like anybody else and given public access only. So: CAT $.ALEXANDER will also only display public access, whereas CAT with ALEXANDER selected as the users root directory will display owner access. To emphasise the point:

DIR $.ALEXANDER selects $.ALEXANDER as the CSD, but only with public access, 29 whereas: DIR selects the same directory, but with owner access, since DIR requests a return to the User Root Directory.

If there is no directory which matches the user identifier, the user is given public access only to the whole disc. This set of rules also applies when selecting a disc so that users files on one disc are protected from people using a separate disc on the same system.

30 2.5 Passwords

2.5.1 How they are used To prevent anybody who knows your user identifier from logging on as you and therefore gaining owner access to your files, it is possible to set a PASSWORD.

This is a string of up to 6 letters and numbers which should be knowr only to you and which must be quoted when you log on. e.g.

I AM ALEXANDER JULIE will allow ALEXANDER to log on if JULIE is his password. But:

I AM ALEXANDER and I AM ALEXANDER CRUST will produce the error "Wrong password".

Mote ON ATOMs and Systems you can prevent your password appearing on the screen by typing CTRL U to turn off the screen, then type your password and then type CTRL F to turn the screen on again. This is not possible on the BBC Microcomputer and you are advised to clear the screen after typing your password to prevent other people seeing it.

2.5.2 Setting the Password - PASS

To set a new password,

type: PASS

For example:

PASS "" JULIE sets ALEXANDERs password to JULIE, and PASS JULIE MOZART sets it to MOZART.

Also:

PASS MOZART removes ALEXANDERs password completely. Give careful thought to your choice of password if you want it to be effective. Your girl-friends name or your car registration are likely guesses for anyone trying to break into your files.

2.5.3 The Password File 31 The file server checks passwords by looking them up in a special file called the PASSWORD FILE. This exists on a disc selected by the file server when it is started up (see chapter 7). It is important to note that a password is therefore associated with a disc, and that if that disc is not in the system when a user tries to log on, he will be looked up in whatever password file is in use by the system.

If a user tries to log on when no password file exits on any of the discs on the system, the error "Password file not found" will occur. making sure that a suitable password file exists is part of the job of operating and maintaining the file server, described in chapter 7.

32 2.6 User Commands and Libraries

2.6.1 Introduction - Commands

It is possible to load and execute machine code programs in a single step simply by typing their name after the "" character indicating a file server command. e.g. PASCAL would load the file PASCAL from the current directory, and then jump to its execution address automatically, in this case starting the BBC Microcomputer Pascal interpreter program. If the name PASCAL had not been found in the currently selected directory, the file server would have then searched the currently selected LIBRARY.

2.6.2 Libraries

A library is simply a directory which is searched to look for command names not recognised by the file server program. When a user logs on, the file server will try to select the directory $.LIBRARY as the users current library. If it cannot find $.LIBRARY, the root will become the selected library. A different library can be selected using the command LIB. e.g.

LIB $.ALEXANDER.MYLIB

This command means that any command which the file server does not recognise is first searched for in the CSD and secondly in $.ALEXANDER.MYLIB. Only when it is not found in the library will the error "Bad command" occur. For example, typing:

EDIT means that a file called EDIT is looked for in the CSD, and if not found there, in $.ALEXANDER.MYLIB. If EDIT is found, it will be loaded and executed. Note that it is impossible to load and execute a directory, so an error would occur if a directory called EDIT existed in either of those directories. The library allows all users of the system to share useful application and utility programs easily. In particular, if command programs are kept in $.LIBRARY, using them is simply a matter of logging on and typing the program name as if executing any other file server command.

2.6.3 RUN and /

Machine code programs can be loaded and RUN using either of these commands. For example, typing:

33 RUN EDIT Or

/ EDIT will cause the file EDIT to be loaded and run. The file is looked up in the currently selected directory and then the current library in the same way as loaded commands.

2.7 EXEC and SPOOL These two commands are useful for dealing with BASIC files and commands. They are only available on the PBC Microcomputer.

2.7.1 EXEC

This command reads byte by byte all the information in a named file as if it were being typed on the keyboard. This is useful when you find that you are repeatedly typing the same sequence of commands. Instead you can build up an "EXEC" file consisting of these commands and type EXEC each time you want to use this sequence of commands. The argument can be a general file specification, that is, it can include directory name(s). For example

EXEC $.JOEY.COMM will read the file COMM in the directory JOEY byte by byte as if entered at the keyboard.

2.7.2 SPOOL

This command prepares a named file to receive the information subsequently displayed on the screen. This is useful for making an "EXEC" file (see section 2.7.1). For example, typing SPOOL FILE will open a file called FILE on the current directory, assuming that the user has sufficient access to do this (see section 2.4), and anything subsequently displayed on the screen will also be sent to FILE. Typing

SPOOL turns off spooling and closes FILE. It is importatn that you turn the monitor messages off when spooling otherwise they may interfere with the data you are trying to send to the file.

VOTE If you have a disc filing system attached to your computer, the disc system commands BUILD, LIST, DUMP, TYPE etc. are available - see the Disc Filing System manual for details.

34 2.8 Auto-start facilities

The facilities described in this section are available on the BBC Microcomputer only.

On the Econet system, auto-start may be selected to occur after either or both of the following actions (1) Resetting the machine with CTRL BREAK or BREAK or on power-up, with the Econet system fitted. (2) Logging on (as in section 2.2.3)

Whichever auto-start is chosen, a file called !BOOT will either be ignored, LOADed, RUN or EXECuted. The action on the file !BOOT is controlled by setting the users OPTION as described in the next section.

2.8.1 Setting option The option for a particular user is selected by that user by typing

OPT 4,n where n is a number in the range 0 to 3. The option numbers have the following meaning: OPTION 0 : ignores !BOOT OPTION 1 : LOADs !BOOT into memory at its load address OPTION 2 : RUNs !BOOT as a machine code file OPTION 3 : EXECs !BOOT

A users option can only be set by the user when logged on.

2.8.2 Auto-start when logging on

When a user logs on, a file called !BOOT is looked for in the users root directory. If the file is found, it is treated according to the option set for the user (see section 2.8.1). If there is no file called !BOOT in the users root directory, or if something goes wrong while loading, an appropriate error will occur (e.g. "Not found").

2.8.3 Auto-start when resetting the machine

If a BBC Machine is started by pressing SHIFT BREAK (both keys held down together), the Econet will attempt to auto-start without further intervention. It will do this by attempting to logon to the default file server as user BOOT. The action which is then taken depends on the option set for user BOOT and the contents of the !BOOT file in user BOOTs directory. If BOOT does not exist, or has no !BOOT file, there will be no auto-start, an error will be generated and the machine will hang until reset with BREAK etc. It should be noted that the user BOOT is no different from any other user name, and can be created by a system user in the normal manner (see 7.7.2). 35 It is possible to configure a BBC Machine so that the action on BREAK and SHIFT BREAK are swopped. This has the advantage that the BBC Machine will always try and auto-start (even on power-on) unless the SHIFT key is pressed. This feature is controlled by link 5 of the set of 8 links located at the right-hand front of the keyboard. These are numbered 1 to 8 from left to right and link 5 must be made to enable auto-start without the SHIFT key. Note that these links are only read by the operating system on hard reset of the machine, so changing the link and then simply pressing BREAK will have no effect on the auto-start state.

36 2.9. Utility Programs

2.9.1 Introduction

The commands described in the following section are command programs which are loaded and executed from a library as described in section 2.6. There are generally three versions of each command, for ACORN SYSTEMS, BBC Microcomputers and ATOMS. On the disc provided with the system, the ATOM versions will reside in $.ATOMLIB, the SYSTEM versions in $. SYSLIB and the BBC Microcomputer versions in the default library $. LIBRARY. Atom and System versions of each program are loaded into the calling machine at 2800. BBC versions are loaded into space reserved by the Network filing system.

2.9.2 INF

This command gives a list of all the entries in a directory and, in addition, provides information about each entry in a format similar to the INFO command. The "page mode" feature of the ATOM may come in handy here. INF can only accept file titles of up to 12 characters. Titles longer than-that will be truncated. This command corresponds to EX in BBC machines. See also section 2.2.10.

2.9.3 DISCS

This command will produce a list of the discs available in the current file server. The list will include the disc name and drive number.

2.9.4 USERS

This command will produce a list of the users currently logged on to the network. The list will include the users name, the privilege and the station number.

2.9.5 Network Utilities

These programs, although loaded from the file server, do not concern the filing system itself, and are described in chapter 5.

They include:

NOTIFY REMOTE VIEW PROT UNPROT

37 2.9.6 PS

This command sets the number of the station which printed output will be sent to (the Printer Server number). e.g.

PS 123 sets the Printer Server number to 123.

See section 4 for more information on printing over the network.

38 2.10 Random access

2.10.1 What is random access?

Random access is the name for reading or writing selected sections of a file. The disc systems available for the BBC, Atom and System computers all provide random access facilities. If you have written programs which make use of these random access facilities, they will run on the network without modification. The operating system primitives which provide these facilities are the same whether used with disc, cassette or over the network. The network filing system will intercept your programs input/output requests and re-direct these to the file server. The concept of file handles (referred to as channels on the BBC Microcomputer) is introduced here, followed by a general consideration of using random access in your BASIC programs. Assembler programmers should note that understanding the use of file handles (channels) is essential if you wish to directly address the file server.

2.10.2 Channels - Opening and Closing files

All the random access operations refer to files using a single byte number called a Channel (Handle on the Atoms and Systems). For example, the BGET# command in BBC BASIC takes a channel as an argument to indicate which file to read e.g. 340 nextletter%=BGET#C

This example is taken from the BBC Microcomputer user guide where all the relevant keywords are explained. In this case the letter C is the channel and the command will read the character in the file which is currently pointed to and assign its value to the variable nextletter%. The first step in using a file for random access is to assign a channel number to the file. Two commands are available in BBC BASIC to do this, OPENOUT and OPENIN. OPENIN is used for existing files which you want to read or update. A typical example of its use is: 230 X=OPENIN("cinemas")

This assigns the channel X to the file "cinemas" which must exist on the disc. After this line in your program you can use X as an argument in any of the read or write statements that you want to act on the file "cinemas". OPENOUT is different because the named file is deleted and recreated with 1K bytes space reserved on the disc. If the named file is not found in the directory, a new one is created. This command is generally used to initially create a file for using with random access. Afterwards OPENIN would be used to open the file. Note that files can only be opened for input and output if the user has sufficient access (see sections 2.2.13 and 2.4). The keyword OPENIN actually opens a file for update, so to use this keyword you need to have both read and write access. If you only have read access 39 to a file, and you wish to open it, you can use the operating system calls to open it for input only - see chapter 3.

The CLOSE# operation "deletes" a channel, so that the file server no longer recognises it and will give an error if used.

A single machine may have up to 8 valid handles at one time. However, three handles are taken up identifying the user environment (see chapter 13), so only 5 other objects can be opened at one time. It should be noted that one user can open a single object several times and can therefore have several different handles refering to it.

2.10.3 Random access in BASIC

The general principles of random access are as follows:

The File must be given a handle (channel). This is a single-byte reference number used by the operating system to identify an area in RAM for loading sections of the file. On the BBC Microcomputer the words OPENIN and OPENOUT do this, FIN and FOUT on Atoms and Systems. Files can only be opened if the user has sufficient access. The next task is to specify which section of the file you want to read or write. This is done by using a pointer to indicate a single byte in the file for the next read or write. Each file is considered as series of single bytes. In BBC BASIC the word used is PTR#. On Atoms and Systems it is PTR. It is used by assigning it a value, e.g. PTR# = 1000

This means that the next byte to be read or written is number 1000 in the file.

There are a number of operators in both the BBC and Atom/System BASIC which allow you to read and write. These are: BBC Atom/System INPUT# GET PRINT# PUT BGET# BGET BPUT# BPUT SGET SPUT

Finally there is a function which tells you when the end of the file has been reached. (i.e. you have read or advanced the pointer to the last byte in the file). This is EOF# in BBC BASIC.

Later versions of BBC BASIC will have an extra keyword called OPENUP. This opens a file for update (reading and writing). OPENIN then becomes open for input only. Full explanation of how to use these BASIC keywords for random access is provided in the reference manual which comes with your computer. Mote Multiple byte access using the operating system call OSBGBP (see section 3.4) is considerably faster than single byte access (as used 40 by BASIC). The operating system call OSBGBP should therefore be used where speed is important.

2.10.4 Using the Pointer

The file sequential pointer (PTR# or PTR) mentioned above can be used to select the next byte to be accessed or to extend the length of a file. If you wish to read a particular byte of a file, all you have to do is assign the correct number to the variable PTR# or PTR. The next byte read will be from the position indicated by the value of this variable. The pointer is incremented by one after each byte is read.

If you wish to extend a file then all you need to do is to assign a value to PTR# (or PTR) which is beyond the end of the file. The variable EXT#, which usually gives the number of bytes in a file will give the total length of the file. An example will probably serve to clarify this. Assume that the file " DATA" has been set up containing 20 bytes of information. If you open the file using A=OPENIN"DATA" then the variables will have the following values:

PTR#A - 0 EXT#A - 20

If you now type

PTR#A = 100 the end of the file will be moved to make the file 100 bytes long and the variables will have the following values:

PTR#A - 100 EXT#A - 100 and the file will be longer by 80 bytes. The extra 80 bytes will all be zeros. Note This can only be done if the file is opened for update (using OPENIN) otherwise you will get the "Outside file" error. If you try to extend a file too far, you may get the error message "Disc full" if there is not sufficient space on the disc.

2.10.5 Interlocks This is a very important feature included in the Econet system. Consider the following situation which might conceivably arise. You open a file to read using random access facilities. At the same time, somebody else opens the same file and starts to update it. It could easily happen that, between your reading one part of the file and another, the person updating the file changes some of the entries. This could produce disastrous results if some of the later data is 41 supposed to match up with some of the earlier data (for example a list of names and telephone number stored as a list of names followed by a list of corresponding numbers).

To prevent this situation arising, a system of interlocks is implemented. The system used is called "multiple reader, single writer and is a common method of protecting multi-user systems. This works as follows: If a file has been opened for reading then anybody else can open the file for reading, but NOT for writing. If a file has been opened for writing, then nobody else (including yourself) can open the same file.

If you are not able to open a file for the above reasons you will get the error "Already Open".

Note The BBC BASIC command OPENIN opens a file for updating, which includes writing. Thus a file can only be opened once using OPENIN.

42 3 Using the File Server from Assembler

This chapter describes the operating system interface for the filing system for the BBC Microcomputer. The interfaces for the ATOM and Systems are described in ATOMIC THEORY AND PRACTICE and the System DOS Manual respectively. This chapter describes a series of operating system calls which can be used to open, close, read and write files.

Files are treated as a sequence of 8-bit bytes. Files can be accessed in one operation (using OSFILE) or a byte at a time (using OSBGET or OSBPUT).

Associated with each file are various parameters. The load address specifies where a file should be loaded into memory if accessed using OSFILE. The execution address is meaningful only if the file contains executable code, in which case this address represents an entry point if the file should be loaded and entered. The extent of the file is its size in bytes (which may take the value zero).

In addition, associated with each open file is its sequential pointer. This represents the index (counting the beginning of the file as zero) of the next byte to be accessed. A number of operating system calls are provided for dealing with files. In the following sections, A refers to the processors accumulator, X and Y to the X and Y registers. The flags are referred to by the letters C, N, V and Z. All addresses are in 6502 order, i.e. lo-byte first, hi-byte last. 3.

1 OSFIND

Call address FFCE (indirects through 021C).

Opens a file for reading/writing/update.

The value in A determines the type of operation.

(i) A non-zero A<>0 causes a named file to be opened. X (10-byte) and Y (hi-byte) point to the name of the file to be opened. The name is represented by a string terminated by a carriage-return (ASCII 0D).

If A=40 the file is opened for input only. If A=80 the file is opened for output only. If A=•C0 the file is opened for reading and updating. ON EXIT, A<>0 implies that the file was successfully opened (A contains the handle for the opened file which must be provided when operating on the file).

43 A=0 implies that the file could not be opened. C, N, V and Z become undefined. The interrupt state is preserved. However, interrupts may be enabled during the operation.

(ii) A zero

A=00 causes (a file)/(files) to be closed.

If Y<>0 the file whose handle is given by Y is closed. If Y=0 all open files are closed (including SPOOL Sand EXEC files). ON EXIT, C, N, V and Z become undefined. The interrupt state is preserved. However, interrupts may be enabled during the operation.

3.2 OSFILE

Call address FFDD (indirects through 0212).

Load/Save data, Inquire/Alter catalogue information.

X and Y point to a control block (X lo-byte, Y hi byte):-

Notes: (i) The character string is terminated by 0D.

A contains a job description parameter.

FF :- LOAD file to given address/files address. The low byte of the execution address (offset 06) determines whether the file should be loaded to its own address (if non-zero) or to the supplied load address (if zero). The files catalogue information will be written into the control block, see 44 item 5. 00 :- SAVE data to file. If start address = end address then the data is of zero length. The files catalogue information will be written into the control block, see item 5. 01 :- WRITE catalogue information for file. Length information is not alterable. 02 :- WRITE the load address to the catalogue information. Only the Load address is required. 03 :- WRITE the execution address to the catalogue information. Only the execution address is required. 04 :- WRITE the attributes to the catalogue information. Only the attributes are required. 05 :- READ files catalogue information. The Load address (offset 02), Execution address (offset 06), Length in bytes (offset 0A), Attributes (offset 0E) and Type (in A) are returned for the particular file. 06 :- DELETE the file and return catalogue information. Returns 0 in A if object did not exist, otherwise non-zero. The attribute of a file is a 4 byte (32 bit) item whose bits refer to the state of the protection flag, and the date. The bottom 8 bits have the following meanings:- bit meaning 7 Undefined. 6 Undefined. 5 = 0 -> the file is not writeable by other users. = 1 -> file is writeable by other users. 4 = 0 -> the file is not readable by other users. = 1 -> the file is readable by other users. 3 = 0 -> the file is not locked. = 1 -> the file is locked. 2 Undefined. 1 = 0 -> the file is not writeable by you. = 1 -> the file is writeable by you. 0 = 0 -> the.file is not readable by you. = 1 -> the file is readable by you.

The Econet filing system places the date information in the next 16 bits using the following format: Lo-byte - days Hi-byte, bits 0 to 3 - months Hi-byte, bits 4 to 7 - years since 1981.

The Type is a byte which describes the object which was found for READ:

Type 0 is no object found Type 1 is file found Type 2 is directory found

3.3 OSARGS

Call address FFDA (indirects through 0214). 45 Reads/Writes an OPEN files attributes. X points to 4 locations in zero page. Y contains the file handle. A specifies the type of operation. If Y is non-zero then OSARGS will do one of the following jobs on the file of which Y is the handle: A=00 read sequential pointer A=01 write sequential pointer A=02 read extent

The result being returned in the zero-page location pointed to by X. If the pointer is set to past the end of the file then the file will be padded such that intervening bytes read as nulls, A will be returned as 0 if the operation is performed, otherwise it will be left unchanged. If Y is zero then OSARGS will do one of the following jobs on the filing system: A=00 Return type of filing system in A 0- No current filing system 1- 1200 baud CFS 2- 300 baud CFS 3- ROM filing system 4- Disc filing system 5- Econet filing system 6- Teletext/Prestel Telesoftware A=01 Return address of rest of command line at X.

3.4 OSBGBP

Call address FFD1

Write/read a group of bytes to/from a specified open file.

ON ENTRY, X(lo-byte) and Y(hi-byte) point to an instruction block:

A determines the type of operation: A=01 Put byte using byte offset A=02 Put byte ignoring byte offset A=03 Get byte using byte offset A=04 Get byte ignoring byte offset A=05 Read title,option A=06 Read current directory A=07 Read current library 46 A=08 Read file names

ON EXIT,

A = 0 implies operation attempted

A=01 to 04 The number of bytes is modified to show how much data has not been transferred (usually zero), the pointer value is updated (i.e. old pointer plus the amount transferred), and the offset is set to its current value. The offset is only defined after the call if you are not using the sequential file pointer. A=05 This returns in the area pointed at by the pointer the disc title of the currently selected disk and the users option. It is returned in this form:- <title><option> The cycle number and option are single binary bytes. A=�06 This returns the currently selected directory. It is returned in this form:- <zero byte><length directory name><directory name><priv> <priv> = �00 => Owner <priv> = �FF => Public A=�07 This returns the currently selected library. It is returned in this form:- <zero byte><length library name><library name><priv></p><p>A=�08 This returns the files in the current directory. The format of the control block is similar to that for sequential files:-</p><p>If the pointer is set to zero the search will begin with the first file. All are updated in a similar manner to the way pointers are updated for A=�01 to �04. The format of the filenames is as follows: <length filename 1><filename 1><length filename 2><filename 2>..... The number of entries which it is possible to read is limited by a 250- byte buffer. Attempts to move more than 250 bytes of data in one operation will produce the "No reply" error. The file pointer may be up to 255 only.</p><p>47 3.5 OSBGET</p><p>Call address �FFD7</p><p>Gets a byte from a specified open file. ON ENTRY, Y is the file handle</p><p>ON EXIT, A contains the byte. If an attempt is made to read past the end of the file C will be set and A=�FE otherwise C is clear. X and Y are preserved.</p><p>3.6 OSBPUT</p><p>Call address �FFD4 Puts a byte to a specified open file.</p><p>ON ENTRY, Y is the file handle and A contains the byte to put.</p><p>ON EXIT, A, X and Y preserved.</p><p>48 4. The Printer Server and Printing.</p><p>4.1 The Printer Server</p><p>The Printer Server is a program available in ATOM BASIC for an ATOM or in EPROM for the BBC Microcomputer. When it is running, it will allow any station on the network to use a printer attatched to it. Once one station is using the printer, all other stations will not be able to contact the printer server until that printing job is finished. Stations on the ECONET expect the printer server station to be number 235, although it is not strictly neccessary to use this number.</p><p>4.1.1 Using a BBC Microcomputer printer server</p><p>The printer server program for the BBC Microcomputer is held in a paged ROM. The computer which is to be used as the printer server must have both the Econet filing system ROM and the Printer Server ROM installed.</p><p>The BBC Machine printer server operates in background, which means that the machine can be used as a normal Econet station while the printer is running.</p><p>A separate manual is provided with the printer server EPROM and contains full operating instructions.</p><p>4.1.2 Using an ATOM printer server</p><p>The Printer Server program in ATOM BASIC can be run on any ATOM attached to the net. The Printer Server is located in directory $.PRINTER on the File Server Master Disc, and is file PSERV. It can be loaded into the relevant ATOM simply by logging on to the file server from that ATOM and using the BASIC LOAD command. After loading the program type RUN to start it.</p><p>4.2 Printing from a station</p><p>There are two steps to starting the Econet printer from a station. Both must be carried out on the BBC Microcomputer, on the ATOM/Systems start at step 2.</p><p>(1) Type</p><p>�FX5,4 to select the Econet printer. (2) Type CTRL-B to make your machine attempt to contact the printer server. If contact is established your station number will appear on the printer, and everthing which appears on your VDU from now on, is sent to the printer.</p><p>49 If the printer server is busy, or not available for some reason the station will show the NOT LISTENING message, and BRK will be executed.</p><p>To finish sending output to the printer, type CTRL-C, which will tell the printer server that you have finished, and print several line-feeds to end your output. If the printer server loses contact with you during a printing session, the message TIME OUT will be printed on the printer, and the printer server will become free for use again. This will also happen if you don�t print anything for a time (about 20 seconds) after you have typed CTRL-B.</p><p>4.3 Several Printer Servers</p><p>An ECONET station keeps the number of the printer server station in RAM. On the Atom and System computers at locations �022E/F (low byte in �022E) on the BBC Microcomputer it is stored in the operating system area. Whenever the machine is hard reset (CTRL BREAK or power-up on the BBC Microcomputer), this number is set to 235, the default printer server. This number can be changed using the �PS command, which is loaded from the file server (see 2.9.6). e.g.</p><p>�PS 123 means that printed output will now be sent from your machine to station 123. To change the printer server number from within an program, simply alter �022E/F (in your Atom or System computer) to be the new number, and type CTRL-B as before. On the BBC computer use OSWORD call with A=�13 (see section 11.8.1). It is therefore quite possible to have several printer servers which can be used by different stations on the network.</p><p>50 5 Talking to other user stations</p><p>5.1 Introduction</p><p>A number of commands are provided which allow for communication between similar stations. Some of these are loaded programs and some are in the Econet filing system ROM. It is possible to take a look at another station�s screen (�VIEW), send a short message to another station (�NOTIFY) or completely take over another station (�REMOTE). The two stations in communication must be of the same type (either BBC Microcomputer or ATOM/System).</p><p>5.2 �VIEW</p><p>VIEW is a command program which is loaded from the appropriate library on the file server, (see section 2.6.1). In Atoms and Systems it is loaded at location �2800 and immediately executed. A station wishing to use VIEW must therefore be logged on to the file server and have the appropriate library selected. The action of VIEW is to copy the screen of a distant user�s station on to your screen. The two stations must be of the same type for this command to work properly. If the distant machine is in a graphics mode, the users machine will also be placed in graphics mode (although this depends upon your graphics mode - see note below), so high-resolution pictures can also be viewed with this command. e.g.</p><p>�VIEW 100 will copy the screen of station 100 to our screen. You can also view a user by specifying his/her user identifier. For example:</p><p>�VIEW JOEY will copy JOEY�s screen to ours if JOEY is logged on to the file server. If JOEY is logged on at more than one station, then only one station at which he is logged on will be viewed.</p><p>Note that after the VIEW has been completed, your own cursor will appear on the screen and may spoil the image. This can be avoided by writing a BASIC program which does the VIEW and then does not return until ESCAPE is pressed: 10 �VIEW 100:REM COPY THE SCREEN 20 REPEAT:UNTIL 0:REM LOOP FOREVER 30 END This program is for the BBC Microcomputer, note that on the ATOM and SYSTEMS the keyword REPEAT should be replaed by DO and the delimiter ":" by ";". BASIC programs may also be written to do continuous VIEWs so you can keep constantly up to date on what is happening on another station.</p><p>NOTE �VIEW will only work between similar stations. Attempting to �VIEW a 51 different type of machine will have unpredictable results. On BBC machines you may get the error "Mode x", where "x" is the mode of the viewed station. This will occur if the machine which you are viewing is in a screen mode which uses more memory than the screen mode you are in. After an error of this kind, you can read the screen mode of the remote station using OSWORD call with A=�13 and the first byte of the control block set to �0A (see also section 6.1.2). The screen mode is returned in the second byte of the control block. This allows you to trap this error and automatically ohange mode.</p><p>S.3 �REMOTE The REMOTE command is, like VIEW, a utility which is loaded from the file server.</p><p>The REMOTE command enables one machine to �take over� another so that everything typed on the users machine is executed on the distant machine. Also, everything which is written to the distant screen is written to the users screen, and the distant keyboard is disabled.</p><p>The effect of this is that the user has control over a distant computer. For example, if a user on station 200 types: �REMOTE 100 the user at station 100 will find that his keyboard does not respond, but everything typed at station 200 appears on his screen. The command may also be used with the user identifier, for example: �REMOTE JEZZ will have the same effect as specifying the station number provided JEZZ is logged on. As for �VIEW, if JEZZ is logged on at more than one station, only one station at which he is logged on will be taken over.</p><p>If user 200 now types RUN, he will run whatever program is in station 100. The program run will NOT be the one on station 200 because station 200 is no longer in touch with his own computer and is effectively acting as a terminal to station 100. When the conversation between the machines is started the remote machine will have to stop what it is doing. On Systems and the BBC Microcomputer an error is generated. If a BBC Machine has Version 1 BASIC and is running a program with. error trapping, the error generated will cause the error trapping loop to be executed. Version 2 BASIC on the BBC Microcomputer will not be able to trap the error generated and so the program will be stopped. On ATOMs the current program will be interrupted in all cases.</p><p>5.4 ESCAPE and BREAK in REMOTE </p><p>5.4.1 On BBC Microcomputers</p><p>Typing ESCAPE on the master machine (station 200 in the above example) during a REMOTE conversation will have the usual ESCAPE effeots. The connection will not be severed, but program listings and programs out of52 control will be stopped. The ESCAPE key on the remote machine is disabled when the REMOTE connection is made. Typing BREAK on the master machine will have the usual effect of BREAK. The connection is severed, and the remote machine is disabled until reset. Typing BREAK key on the remote machine resets the machine as usual but the connection is only severed until the master types something at his keyboard. As soon as this is done, the connection is re- made. Even if the remote machine is switched off and then on again, the connection will be re-made once the master starts to type something. 5.4.2 On ATOM and Systems</p><p>Typing ESCAPE on the master machine (station 200 in the above example) during a REMOTE conversation will re-initialise the link between the two machines. This has a similar effect to typing ESCAPE in BASIC in that listings and programs which are out of control can be stopped without having to reset the machine by typing BREAK. A BRK instruction will again be executed, so an error message will occur when ESCAPE is typed. The BREAK key cannot be disabled on the remote machine, and if the person who has been taken over hits break, his machine is reset and is no longer in contact with the �master�. When this happens, the master machine may either be trying to send something to the remote machine, or waiting for an instruction from the remote machine. If it is trying to send, after a few seconds (typically 5), it will give up and the message NOT LISTENING will appear on the master screen. If it is waiting, it has no way of knowing that the remote machine is no longer interested and will continue to wait until it is reset (or remotely taken over by somebody else). This will have the effect of disabling the keyboard. Similar effects will occur in the remote machine if BREAK is hit on the master machine.</p><p>5.5 �ROFF �ROFF stands for �Remote Off� and when typed on the master machine terminates the link between the two machines.</p><p>5.6 �NOTIFY �NOTIFY is a command provided in the station EPROM for ATOMs and Systems but is a loaded program for the BBC Microcomputer which allows single line messages to be sent from station to station. The message can only be sent between similar stations. e.g.</p><p>�NOTIFY 234 HOW ARE YOU BRIAN ? sends the message HOW ARE YOU BRIAN ? to station 234. Just as with �VIEW and �REMOTE you can type something like: �NOTIFY BRIAN HOW ARE YOU BRIAN?</p><p>On the BBC Microcomputer the message is sent directly and goes into the keyboard buffer of BRIANs machine. A beep occurs and the following 53 will be printed on the screen:</p><p>-- 100: HOW ARE YOU BRIAN? -- where 100 is the sending station number. No carriage return is printed so BRIAN can delete the message from the line before continuing to type in at his keyboard.</p><p>On ATOMs and Systems, the message is only received when BRIAN presses carriage return on his machine, so that the message does not suddenly break into a line that he is typing. Until then, the station sending the message is inactive. If you type ESCAPE on the sending machine, the message is not sent, and you are back in control of your machine. When BRIAN types carriage return, the message:</p><p>100: HOW ARE YOU BRIAN ? will appear, if station 100 sent the message. Nothing else in his machine will be affected, and after the message is printed, the line which he has typed will be executed as usual.</p><p>5.7 Protection</p><p>5.7.1 Protection from what?</p><p>It is possible to stop other machines on the network from using NOTIFY or REMOTE on you. The mechanics of this are described in more detail in section 10.6, and the specific machine implementations in sections 11.7 and 12.7, but for most users the commands below should be sufficient.</p><p>5.7.2 �PROT</p><p>This is a command program loaded from the File Server which makes your machine protected. Any machine which tries to REMOTE, VIEW or NOTIFY you will now not be able to contact you and will get a NOT LISTENING error. You are, however, still able to TRANSMIT and RECEIVE (see section 10.6), which means that you can still use file commands to contact the file server. Station numbers 240-254 are privileged in that protection does not prevent them from using NOTIFY/REMOTE and VIEW on other stations. It is suggested therefore, that only one station on the network be given a privileged number, and its use be strictly controlled.</p><p>5.7.3 �UNPROT �UNPROT is again a command program, which simply makes your machine unprotected.</p><p>54 6. Errors</p><p>6.1 Errors on the BBC Microcomputer </p><p>6.1.1 Error messages</p><p>If the file server objects to some command, a message will be displayed. Most of the common errors are self-explanatory, but some will produce a message: F.S. Error xx</p><p> where xx is a hexadecimal number.</p><p>This means that the file server has sent an error number for which it doesn�t have an associated string. Section 6.4 gives a full list of the error numbers and a brief explanation of each.</p><p>A 6502 BRK instruction is also executed, which will signal to BASIC that an error has taken place. BASIC will react as it normally does to errors. (See the BBC Microcomputer User Guide for details). However, things are not quite as simple as they may seem. The BBC Microcomputer can only cope with error numbers in the range A8 to C0 from the Econet File Server, but the File Server can generate many more numbers than this range allows. To overcome this problem, error number A8 is really a composite number. If error number A8 is returned, then this means that an error number less than A8 is the true error number sent from the file server. This number can then be found by calling an OSWORD call. The string "F.S. Error xx" will display the real error number, but typing "PRINT ERR" (in BASIC) would return 168 (�A8).</p><p>6.1.2 OSWORD call to read error number </p><p>OSWORD call with A=�13.</p><p>The first byte of the control block (pointed to by XY - X lo-byte, Y hi-byte) should be set to �0A. The result returned in the second byte of the control block is an error number (see also section 11.8.1).</p><p>6.1.3 Line jammed - error number �AO</p><p>This error is returned if there is continuous information on the data lines. This may be due to a fault ip another station or in one (or both) of the terminators.</p><p>6.1.4 Net error - error number �A1</p><p>This message is returned if an error occurs during transmission. It may be due to an unsuitable clock speed for the network, a fault in the terminators or a fault in the network cable.</p><p>6.1.5 No clock - error number �A3</p><p>55 This message is returned if the Econet interface cannot detect a valid clock signal. After checking that you are plugged in to the network, the problem will probably lie either in the clock generator or the clock lines of the cable.</p><p>6.1.6 Bad TXCB - error number �A4</p><p>This message indicates that a bad transmit block was used (see section 10.2).</p><p>6.2 Errors on the ATOM and Systems</p><p>6.2.1 Error Messages</p><p>The behaviour of ATOMs and Systems to errors is essentially the same as the BBC Microcomputer. Either an English error message or the message:</p><p>F.S. Error xx will be displayed followed by a 6502 BRK instruction. However, the ATOM and Systems do not use error numbers less than A8 so error number A8 is not a composite number. 6.3 Errors common to all machines 6.</p><p>3.1 NOT LISTENING - error number �A2</p><p>This message may occur when any NFS command is executed, and means either that the machine to which the command is directed is not attatched to the network, or is not interested. For example, trying to save a file on a network without a file server, or when the file server program is not running, will produce the NOT LISTENING message. Similarly, the message will appear on trying to VIEW a non-existent station. The message will also occur when the distant machine is protected (see section 5.7) and REMOTE, VIEW or NOTIFY is attempted.</p><p>6.3.2 NO REPLY - error number �A5</p><p>This message is less likely to occur and generally means that some operation has failed in the middle. For example, if a user types LOAD " FILE" and at that moment, the disc is removed from the file server, or the file server is disabled in some way, it is likely that the NO REPLY message will occur.</p><p>6.3.3 Channel - error number �DE</p><p>This will occur if the Econet filing system memory is corrupted or if you switch your machine off and then on again while logged on. To rectify you will need to log on again.</p><p>56 6.4 List of Errors</p><p>This is a comprehensive list of errors, most of which will be turned into brief English strings before being sent to the client.</p><p>However, it is hoped that the list will be useful when writing programs using the file server interface (see chapter 13), and will provide a reference for the few errors which are returned to a user as hexadecimal numbers. The word �object� in the following descriptions refers to a file or a directory.</p><p>ERR (hex) Description</p><p>13 USRMAN.RESTART called twice 14 Object not a directory 15 User not logged on 16 Machine zero is invalid 21 Cannot find password file 27 Password file syntax error 29 Object "$.PASSWORDS" has wrong type 31 STRMAN.RESTART called twice 32 SIN = 0 33 REF COUNT = �FF 34 REF COUNT = zero 35 File too big or zero length 36 Invalid window address 37 No free cache descriptors 38 Window ref count > 0 39 Big buffer already in use 3A Invalid buffer address 3B Ref. count = �FF 3C Store deadlock 3D Arith. overflow</p><p>42 Broken directory 46 Attempting to set WR attributes to a directory 48 Not defined 4C No write access 4E Too many entries asked for in EXAMINE 4F Bad ARG to EXAMINE. 53 SIN not for start of chain 54 Disc not a file server disc 55 Both sector maps corrupt 56 Illegal drive number 57 Map seq. nos. differ by >1 58 Object size zero 59 New map doesn�t fit in old space 5A Disc of same name already in use 61 RNDMAN.RESTART called twice 64 All handles open - handle table full 65 Object not open 66 Cannot copy file handles 67 RANDTB full 57 69 Object not a file 6D Invalid arg to RDSTAR 6F GETBYTE; byte after last in file 71 Invalid number of sectors 72 Store address overflow 73 Accessing beyond file end 74 Invalid SIN 83 Too much data from olient (SAVE) 84 Wait bombs out 85 Invalid function code 86 Undefined 8A File too big 8C Bad privilege letter 8D Excess data in PUTBYTES 8E Bad INFO argument 8F Bad arg to RDAR A0 Line jammed A1 Net error A2 Not listening A3 No clock A4 Bad TXCB A5 No reply AD Mode x AE User not logged on AF Types don�t match B0 Renaming across two discs B1 User id. already exists B2 Password file full B3 Maximum directory size reached B4 Directory not empty B5 Trying to load a directory B6 Disc error on map read/write B7 Attempt to point outside a file B8 Too many users B9 Bad password BA Insufficient privelege BB Incorrect password BC User not known BD Insufficient access BE Object not a directory BF Who are you? C0 Too many open files CI File not open for update C2 Already open C3 Entry locked C6 Disc full C7 Unrecoverable disc error C8 Disc number not found C9 Disc protected CC Bad file name CF Invalid access string D6 Not found DE Channel DF End of file 58 FD Bad string (filename etc.) FE Bad command</p><p>59 7 Supervising the network</p><p>7.1 General principles</p><p>It is important that someone is appointed to supervise the ECONET network. Installing a network requires some advance planning, and running the ECONET efficiently requires that some routine tasks are performed regularly, particularly with reference to the file server. Starting the file server is one aspect of the supervisor�s job described in this chapter. Another important task is �ARCHIVING� which means taking regular copies of file server discs as protection against their loss or damage. This chapter is written for the network supervisor and may be ignored by most network users.</p><p>7.2 Hardware Requirements</p><p>The file server is written in 6502 machine code and is therefore restricted to running .on 6502 machines. It is designed primarily for use on ACORN SYSTEM 3, 4 and 5 computers with one or more disc drives. A version will also be available for running on a BBC Microcomputer with second 6502 processor and disc drive(s). The BBC Microcomputer version will have the advantage of being faster than the Systems 3, 4 or 5. The system running the file server should have at least 40k of RAM to support dual 40 track discs, and it is recommended that 48k of RAM be used with dual 80 track discs. The amount of free memory in the machine will affect the performance of the file server with heavy loading (20+ users using the system constantly), and for systems which are going to be subjected to such a load, 40 or 48k of memory is recommended.</p><p>The File Server is loaded at �2400 on the Systems, and the 40-48K of memory should be available from there upwards. This will also take care of the requirements of the initialisation program written in a version of BASIC loaded at �A000. Page zero should also be available. The maximum amount of disc space supported by this file server is 800k on two double sided 80 track 5.25 inch floppy discs.</p><p>7.2.1 A Useful File Server configuration</p><p>This section describes the cards which should be incorporated into either a System 3/4 or a System 5 to provide a useful file server.</p><p>System 3/4 CPU card VDU card Econet Interface card (preferably station 254) Memory: Either 5 (or 6) 8K RAM cards linked at �2000, �4000, �6000, �8000 and �A000 (and �C000 if required). Or One 32K Dynamic RAM card at �2000, 54000, �6000 and 58000 plus one (or two) 8K RAM cards at 60 �A000 (and �C000 if required). Disc interface card and one or two disc drives Econet software in EPROM at �E000 DOS software in EPROM at �F000</p><p>System 5 CPU card with combined DOS/Econet EPROM. VDU card Econet Interface card (preferably station 254) Memory: Two 32K Dynamic RAM cards linked at �2000, �4000, �6000, �8000 and �A000, �C000. Disc interface card and disc drives</p><p>7.3 Discs provided</p><p>7.3.1 File server and DFS discs not compatible</p><p>Beoause the File Server provides a completely different file system to the single user disc systems, discs which are used in the file server contain data structures which are not understood by the System DOS or the BBC Microcomputer DFS. The result is that DFS discs cannot be used in the File Server and File Server discs cannot be used under DFS. Throughout this manual discs for use under the BBC Microcomputer DFS or System DOS will be called DFS discs, and those for use with the file server, file server discs.</p><p>The following two discs are provided with the ECONET system:</p><p>7.3.2 The NETWORK UTILITY DISC</p><p>This is a DFS disc and contains useful DFS utilities for copying discs, formatting discs etc. These are documented in the appropriate disc system manual. It also contains the following programs: a) The File Server itself (FS) b) The disc initialisation program and EXEC file (MPINIT) and INITxx ( xx is the version number). c) SBASIC - the BASIC used to run the initialisation program. 7.</p><p>3.3 The FILE SERVER MASTER DISC</p><p>This is a file server disc which is initialised and contains REMOTE and VIEW for Systems, BBC Microcomputers and Atoms, various other utilities, and the printer server. This is provided so that the file server can easily be started up without having to go through the process of initialising a file server disc when still unfamiliar with the file server itself. Initialising a file server disc and copying DFS discs to file server discs is 61 described in sections 7.5 and 7.9 respectively.</p><p>7.3.4 Disc care and handling</p><p>Discs should be handled with care to avoid physical damage or damage to the recorded information. The following guidelines should be observed: Do not try and remove the circular magnetic disc from the square, black protective jacket covering it.</p><p>Do not touch the exposed recording surfaces.</p><p>Avoid dust. Put the discs back into their envelopes when they are not in the disc drive.</p><p>Do not bend them, drop them on the floor or put heavy objects on them.</p><p>Keep them in a storage box designed for the purpose.</p><p>Keep them away from strong magnetic fields such as those generated by televisions, monitors, tape recorders, telephones, transformers, calculators etc. Avoid excessive heat, moisture and direct sunlight.</p><p>Only use felt-tipped pens to write on the labels and don�t press hard. Insert discs into the drive carefully. If it rotates noisily open the drive door and adjust it.</p><p>Information is packed quite densely onto the disc, so they are sensitive to even very small scratches and particles of food, dust and tobacco.</p><p>7.4 Starting the file server program</p><p>7.4.1 Basic steps</p><p>To run the file server program you will need an initialised file server disc. Section 7.5 deals with this initialisation, but you can start the file server with the FILE SERVER MASTER DISC provided. So to get going all you need do is follow the instructions below for a routine start of the file server program.</p><p>7.4.2 Routine starting procedure This is the procedure to start the file server program whenever you have initialised file server discs ready. Errors occuring on the file server machine will be of the same form as error messages sent to a remote station - most will be in English, with less frequent ones in the form F.S. ERROR xx (see chapter 6). 62 BEGIN HERE</p><p>Press BREAK (followed by �DISC if necessary) to initialise the disc system on a BBC Microcomputer. Press DELETE BREAK on an Acorn System computer (holding both keys down together).</p><p>Insert the NETWORK UTILITY DISC. Type �FS �RETURN� on the BBC Microcomputer </p><p>Type FS �RETURN� on a System computer</p><p>It is very important that the memory is completely reliable so the file server will now start and test all the memory. While it is testing memory it will display: ACORN File Server III.xx </p><p>Testing Memory</p><p>This will take several seconds. Just wait patiently for it to finish. If faulty memory is found the address where the fault occurs will be reported. If everything is OK, the file server program asks some questions starting with:</p><p>1) DATE (DD/MM/YY) (xx/yy/zz)=</p><p>Insert a file server disc. (The FILE SERVER MASTER DISC if this is the first time you are starting the program). Enter todays date in DD/MM/YY format. The file server will make a guess at the date (xx/yy/zz) and if this is correct, simply type carriage return to continue. NOTE that the date will be stamped on all save operations taking place during the session, so it is worth making sure that the date entered is correct.</p><p>2) DRIVES= Enter the number of drives </p><p> on your system.</p><p>If only one drive is specified on a dual drive system, drive 0 will be assumed by the file server. It is not possible to use drive 1 by itself on a dual drive system.</p><p>3) COMMAND = At this point, 5 options </p><p> are possible:</p><p>S(tart) the file server I( initialise) a new disc 63C(onvert) a DFS disc Q(uit) exit the file server. A( gain) return to DATE prompt.</p><p>To continue, type S.</p><p>4) USERS =</p><p>Before you answer this prompt, make sure that the NET UTILITY DISC is removed, and that each drive contains a FILE SERVER FORMAT DISC.</p><p>Then simply enter the maximum number of users you expect to use the file server during this session.</p><p>The file server should now respond with:</p><p>STARTING - READY</p><p> at which point it can respond to requests from stations on the ECONET.</p><p>The File Server will not start if none of the discs in the system contain a password file, as it will then have no way of checking users who are trying to log on. The FILE SERVER MASTER DISC has a password file and a user called SYST with no password set. You can log on to the file server from a station using this identifier. Read the following sections of this chapter to find out how to proceed.</p><p>If you haven�t already done so, it is probably a good idea to read through chapter 2 of the manual before continuing, to get a general view of the filing system. In particular, it will be helpful to understand the ideas of the ROOT and USERS ROOT directories (seotion 2.3.5).</p><p>7.4.3 File Server Monitor</p><p>It is possible for the file server to produce a display giving information on the commands received. The monitor is swtiched on or off by hitting the "m" key. When the monitor is on, every time a command is received by the file server, it displays the command and the station number of the station which sent the command.</p><p>7.5 Initialising file server discs</p><p>7.5.1 Why necessary?</p><p>In order to support many users on one disc, several data structures must be placed on a disc before it can be used in the file server. NOTE - that the format of DFS discs is very different, and the file server will reject these if used.</p><p>The initialisation process is in three stages: </p><p>1/ Format the disc in DFS.</p><p>2/ Execute MPINIT to map the disc.</p><p>64 3/ Create A root directory.</p><p>These are discussed in the following sections.</p><p>7.5.2 Formatting the disc</p><p>This "soft-sectors" the disc using a disc system utility called FORMAT. 40-track discs should be formatted using the utility FORM40, 80- track discs using FORM80. The program operates on the currently selected drive, so use the �DRIVE command before executing the FORMAT ( see DFS manual). (See also section 7.10).</p><p>7.5.3 Initialising the disc maps</p><p>With the NETWORK UTILITY disc inserted, type �EXEC MPINIT. The BASIC interpreter will be entered, and a program loaded and run. Several questions are displayed as follows: DISC NAME: and a name of up to 16 characters (spaces not allowed) should be entered. The file server will use this name to refer to the disc, and it should be chosen to indicate what is on the disc. NUMBER OF TRACKS PER SIDE:</p><p>Simply enter the number of tracks on ONE side of the disc (typically 40 or 80).</p><p>DOUBLE SIDED?</p><p>Answer Y or N depending on whether the disc is single or double sided. </p><p>DRIVE:</p><p>Answer with the drive which holds the disc to be initialised, and make sure that the file server disc is inserted in that drive (the program will remind you). There will be a short wait (approximately 30 seconds or so) while the program constructs the map. There will then be a disc transfer, and the message</p><p>DISC MAPS INITIALISED indicates the end of the program.</p><p>7.5.4 Creating the ROOT and PASSWORD file</p><p>This final stage must be done in the file server itself, so start the file server up (using the NETWORK UTILITY DISC), entering "1" at the DRIVES prompt. At the COMMAND prompt, type I (for initialise), making sure that the disc to be initialised is in the machine in drive 0. The prompt</p><p>PASSWORD FILE? 65 will appear. It is not neccessary for a disc to have a password file (see section 7.6), so type Y or N here.</p><p>If Y, you will be repeatedly prompted for USERID =, at which point you should enter the user identifiers of people you wish to log on with this disc. Their passwords are intialised "empty", and should be set using the �PASS command from a network station. Typing carriage return at the prompt will finish the initialisation profess and you will be returned to the COMMAND prompt, at which point You can re-execute any of the 5 options.</p><p>The disc is now ready for use.</p><p>7.6 Managing the password file</p><p>So that the file server can check users� passwords when they log on, there must be at least one disc in the system which contains a password file. If there is no password file, anybody trying to log on will get the error PASSWORD FILE NOT FOUND. It is therefore up to the operator of the file server to make sure that when people are trying to log on, there is a relevant password file available. It is not neccessary to have a password file on every disc, and in fact not very desirable since it is then quite possible that one user will have several passwords. It is suggested that each group of people that uses the file server (school classes etc.) has ONE disc only with a password file, and if other discs are required for a group, that these should be initialised without a password file. On a system with two drives, it is then possible to use the password file disc as a master disc, which is always in the system, with other supplementary discs being used on another drive.</p><p>On a single drive system, managing with a single password file is more difficult since the master disc may have to be removed from time to time. In this case, it is probably still preferable to have one password file only, rather than duplicating the file on each disc. It is then neccessary to make sure that everyone who should be logged on is logged on before removing the master disc. If there are two discs with password files in the system at once, the file server will only use one of them, selected when the system is started up, and then re-selected each time a disc is changed. The file server selects the file by simply searching each disc in turn, starting at drive zero, until it finds a password file. If there is a password file on both drives, the one on drive zero will always be selected. Note that this search is always done whenever a disc is changed, so removing the disc on drive zero, and replacing it with a disc without a password file would result in the password file on drive one becoming selected.</p><p>7.6.1 Forgotten passwords</p><p>If somebody forgets a password, a system user has to delete the relevant user identifier, and then re-create it (see section 7.7.2). This has no effect on the user�s files, but restores the password to 66 "". It can then be reset as usual.</p><p>7.7 Privileged users - setting privilege</p><p>A privileged (or "system") user is allowed three sets of facilities which are denied to other users: 1/ Ownership of the root directory on any disc. </p><p>2/ The ability to create and delete users</p><p>3/ The ability to grant privilege to other users.</p><p>A system user is therefore able to create and delete entries in any directory on the system, and in particular, can create entries in the root. This enables new user root directories to be created, and allows libraries to be maintained etc. The �PRIV command can be used by a system user to make other users system or non-system users e.g.</p><p>�PRIV ALAN S makes ALAN a system user</p><p>�PRIV ALAN makes ALAN a non-system user again.</p><p>7.7.1 The user SYST</p><p>Since only system users can create system users, there must be one system user to begin with. Therefore, a system privileged user called SYST is always automatically created in a password file . This user should have a password set as soon as possible after initialising a disc, as anybody logging on as SYST has complete access to all discs on the system. SYST can be used to make users privileged, and create useful entries in the root.</p><p>Apart from being a system privileged user, SYST has no other special abilities, and once other system users have been created, could be made into an unprivileged user or removed completely if required.</p><p>7.7.2 Creating and deleting users The command �NEWUSER creates a new user in the password file: </p><p>�NEWUSER JOEY creates user JOEY who can now log on. In order to give a new user some file space of his own, it is also neccessary to create a directory in the root with the same name as his user identifier. This can be done separately using the �CDIR command.</p><p>67 Removing a user is done with the command �REMUSER. Again, this does not affect his file structure which remains on the disc and must be deleted using �DELETE. All these operations can ONLY be done by a system privileged user.</p><p>7.7.3 Extending the Password file</p><p>This will have to be done if more system users are created. The File Server Master Disc has a utility, in the appropriate library, called �EXTENDPWF". To extend the password file, log on as a system privileged user (SYST) and type:</p><p>�EXTENDPWF</p><p>This will reserve space for another 14 users. Note that this routine uses memory locations �8C to �8F inclusive in BBC Machines.</p><p>It is important that you update the passwords file on the correct disc.</p><p>7.8 Changing Discs</p><p>In order to give a fast reponse to file commands, the file server keeps a lot of information about its discs in memory when it is running. This means that it is NOT POSSIBLE TO SIMPLY REMOVE AND CHANGE A DISC WITH THE FILE SERVER RUNNING. If this is done, the file server will still be under the impression that it is dealing with the previous disc and WILL CORRUPT THE NEW ONE. To change a disc with the file server running, first press the ESCAPE key, and keep it down until the file server responds.</p><p>If running on a dual drive system, the prompt:</p><p>DRIVE:</p><p> will be given. Answer with the drive which is to be changed.</p><p>On a single drive system, the file server will immediately go on to the next message: CHANGING DRIVE - xx </p><p> where xx is the drive number.</p><p>Some disc transfers may now take place as the information in store is returned to the disc.</p><p>The message:</p><p>CHANGE DISC</p><p> will now appear, and the discs can be changed.</p><p>When this has been done, press the SPACE bar, and the file server will 68 restart with the new disc.</p><p>NOTE - it is not possible to run the file server with two discs of the same name, as people using the system would have no way of distinguishing between them.</p><p>7.9 Copying discs from DFS</p><p>This facility is provided so that files created under DFS and in particular using File Server I, can be copied to a file server format disc.</p><p>The destination disc should be an initialised file server disc with a root directory.</p><p>This program will work with a single drive system, but the discs will have to be repeatedly changed as the files are copied across. Note that in the following discussion the word "Qualifier" is used to refer to the DFS directories so as to distinguish them from file server directories.</p><p>1/ Start the file server, making sure that the file server disc is inserted. If you have a dual drive system, and have typed 2 to the DRIVES prompt, the File Server will expect a File Server disc to be on each drive at this point. 2/ At the COMMAND prompt, type C, for convert. </p><p>3/ The prompt</p><p>DRIVE:</p><p> will appear, followed by</p><p>SIDE:</p><p>Answer these with the drive and side of the DFS disc you wish to copy. Sides are numbered 1 and 2 for top and bottom surfaces. On a double-drive system, the DFS disc should always be on drive 1 ( the right-hand drive usually). 4/ On a single drive system, the prompts INSERT DFS DISC, or INSERT F.S. DISC will appear. At these points, insert the relevant disc, and press the SPACE bar when done.</p><p>5/ The catalogue of the DFS disc will now be inspected, and a prompt</p><p>DIRECTORY FOR QUALIFIER "x": will appear for each qualifier found. Give the directory name into which files under that qualifier are to be copied on the file server disc. If the directory does not exist, it will be created. If you do not want to copy files under some qualifier, type carriage return at this prompt, and those files will be ignored. If any error occurs, a message will be displayed, and you will be able to try entering the directory name again. 69 6/ Only 7 qualifiers can be dealt with at once, and if this number is reached, the program will start the copy immediately.</p><p>7/ Once all the qualifiers have been dealt with (or the maximum number reached) the files will be copied, one at a time, in blocks of �0F00 characters. This means that large files may require several changes of disc on a single drive system. 8/ If an error occurs during the transfer, the message CONTINUE? will appear. Type Y here if you wish to continue with the next file (the one with the error is not converted), or N if you wish to quit the program. It is possible that you will have files on a DFS disc which do not have legal file server names. In particular, file names with "." in them should be treated with care, as the file server will treat this as a directory name delimiter. 9/ The final prompt is AGAIN? which allows you to insert another DFS disc (NOT file server disc) and do another conversion. Typing Y restarts the program, N returns you to the COMMAND prompt.</p><p>7.10 ARCHIVING! - Data security</p><p>One of the most important duties of the network supervisor is to regularly make copies of the file server discs. This is because discs may become unreadable for a variety of reasons. Either rough handling or an operating mistake can destroy the information stored on disc. The following sections discuss a practical backup routine and what to do if a disc fails.</p><p>7.10.1 Backup routines</p><p>To protect the information saved onto the file server discs, the network supervisor should make regular copies of the discs. Where computers are used in business, industry or other activities which use large volumes of information, a standard routine has evolved. It is often called the "Grandfather, Father, Son" principle of copying information. Applying this principle to protecting the file server information will be beneficial. It works as follows: Day 1 MASTER copied to SON Day 2 MASTER copied to FATHER Day 3 MASTER copied to GRANDFATHER</p><p>As you can see, it involves keeping three separate discs, each with a copy of the information from the master disc on it. On day 4 the master would be copied to the son again, and so the cycle continues.</p><p>The routines to copy discs which are available on the NETWORK UTILITIES DISC are described in the next sections.</p><p>7.10.2 Copying on the BBC Microcomputer file server</p><p>Before a disc can be copied to it must be formatted. To do this proceed as follows:</p><p>Insert the Network Utilities disc in drive 0 and type 70 �FORM40 or</p><p>�FORM80</p><p>You should use the former command if you have 40-track drives and the latter for 80-track drives.</p><p>Remove the utilities disc, put a new disc in its place. DO NOT FORGET TO CHANGE THE DISCS OVER. In reply to the question</p><p>Format which drive ? reply with "0". And in reply to Do you really want to format drive 0 ? t ype "Y", and wait while the computer formats the new disc. A series of numbers are displayed and when formatting is finished the word "Verified" appears. Now remove the new disc. If you have a dual-drive,</p><p>Put the Network Utilities Disc in drive 0, put the new disc into drive 1 and type</p><p>�FSCOPY 01 <name of backup disc></p><p>Where <name of backup disc> is the name you want the backup disc to have (you can use this to give the backup disc a different name to the master disc, thus distinguishing the two). Then replace the Network Utilities disc by the master disc and hit the SPACE bar, and wait while a copy of the master is made to the new disc. If you have a single drive, put the Network Utilities disc in drive 0 and type:</p><p>�FSCOPY 00 <name of backup disc> and then follow the instructions on the screen to insert the master disc and the new disc alternately.</p><p>The utility "�FSCOPY" automatically copies both sides of double-sided discs which is essential for file server discs.</p><p>7.10.3 Copying on the system file server</p><p>Before copying to a new disc it must be formatted. To do this put the utilities disc in drive 0 and type FORM40 or</p><p>71 FORM80 depending on whether you have 40 or 80 track drives.</p><p>Remove the utilities disc and replace it with the new disc to be formatted. DO NOT FORGET TO CHANGE THE DISCS OVER. In reply to the question Do you really want to format drive 0 type "YES", and wait while the disc is formatted. After a while a series of numbers will be displayed finishing up with the message "Verified". Now remove the new disc and put the utilities disc back in. Type COPY 01</p><p>After the disc has stopped moving, remove it. Put the master disc in drive 0 and the new disc in drive 1. Press the SPACE bar and wait while a copy of the master is made to the new disc.</p><p>"NOTE It is essential that a complete copy of the master disc is made when backing up file server discs. Using routines to copy individual files (e.g. COPYF on the systems) will not produce a useful copy of a file server disc. If you are using double-sided discs you MUST copy both sides of the disc to produce a valid back-up copy. To do this you need to use COPY 01 and then COPY 23.</p><p>72 8. Installing a Network</p><p>8.1 Items required</p><p>To install an Econet network you will need the following items:</p><p>Two terminators with power supplies One clock with power supply Cable for the network Sockets and plug connectors</p><p>Each of these items is discussed in the following sections. 8.</p><p>1.1 Terminators</p><p>Two terminators are required, one for each end of the network cable. These are available ready-to-use housed in small plastic boxes. A socket on one end of the box is provided to connect the 8 volt power supply. On the other end of the box is a 5-pin DIN sooket to connect to the end of the network cable. 8.1.2 Clock</p><p>One clock is needed for the network. It is important that only one clock is connected to the network. An Econet network clock is available housed in a box similar to the terminator boxes (don�t get the two muddled up otherwise your network will not function correctly). The clock box has a power supply socket to accept an 8 volt DC supply and a 5-pin DIN socket to connect the box to the network. It is possible to alter the clock rate, this is dealt with in section 8.3. 8.1.3 Cable</p><p>The Econet network requires a four-core cable with earth screen. The cores should have a diameter of 0.9mm and the end-to end resistance of the network cable should be less than 15 ohms. The best cable to use is one which has its four cores arranged as two twisted pairs.</p><p>8.1.4 Sockets and plug connectors</p><p>Standard 180 degree 5-pin DIN sockets are used for connections to the network. Good quality DIN sockets should be used. Two 180 degree 5-pin DIN plugs should be joined by a piece of cable wired pin-to-pin. This is used to connect the stations to the network. The cable MUST be less than 2 metres long. 8.1.5 Suppliers</p><p>The various bits and pieces needed to make an Econet network can be obtained from the following suppliers. The list is by no means exhaustive and alternative parts may be suitable.</p><p>Terminators and Clock</p><p>These are provided by Acorn. The following parts numbers are</p><p>73 applicable:</p><p>Terminators Acorn part number AEH05 Clock Acorn part number AEH04 Power supply Acorn part number AAH08</p><p>Cable</p><p>BICC cable number CS7227 from BICC in 2Km reels Acorn, part number AEX03, by the metre. For shorter networks (less than 300m) RS cable 367-921 in 100m reels from RS.</p><p>Sockets - 180 degree 5-pin RS 478-273 (screw mounting) and RS 478-633 (circular mounting). </p><p>Lead connectors with 180 degree 5-pin plugs</p><p>Acorn part number AEX01 (1 metre of cable with two DIN plugs fitted and one T-piece). Local hi-fi stores (make sure that the wiring is pin-to-pin) </p><p>Telephone numbers</p><p>BICC Helsby (09282) 2700 RS 01-253-3040 Acorn Cambridge (0223) 245200 - Sales Department.</p><p>8.2 Installing the network</p><p>Installing a network basically consists of laying the network cable, connecting DIN sockets where required and connecting the terminators and clock. However, before starting to set up your network, some precautions should be noted if it is to work reliably. (1) Good soldering is essential. Dry joints or poor contacts which may cause intermittent operation are extremely difficult to track down and rectify. It is much better to spend some time (and money) in getting good connections in the first place.</p><p>(2) Short circuits will cause the system to malfunction. Hence you are strongly advised to use rubber insulating sleeves on the back of the DIN sockets to prevent possible short cicuits. (3) Avoid cross wiring. The BICC cable recommended above has two white cores, one twisted around an orange core and one twisted around a blue core. It is very easy to get the white cores muddled up, if you do the system will not work. Unfortunately, the cores are not twisted very tightly and it will probably be necessary to strip off about 20cm of the outer insulation to determine which white is twisted around which colour. This is important to reduce cross-talk between the data and clock lines. If possible use a cable which has four differently coloured 74 cores. If you cannot do so, short circuit one twisted pair at one end of the cable and use an ohm-meter or battery and bulb to test for continuity. The polarity is also important. Thus the two data wires should not be switched around (similarly for the two clock wires).</p><p>The basic layout for the Econet network is shown in figure 1. The network consists of one cable without branches to which everything is connected by 5-pin DIN plugs and sockets. The sockets are all wired in parallel. The suggested colour codes for the connections are: RS BICC DIN pins Data + Black White 1 Data - Red Orange 4 Earth Shield Shield 2 Clock + White White 3 Clock - Black Blue 5</p><p>The DIN plug pin number allocations are shown in figure 8.2</p><p>When installing the cable it is probably best to start at one end and work your way along, making sure that the similar coloured wires are not crossed before inserting each socket. For good network reliability, the sockets should be soldered into the network cable and the use of T-junction DIN sockets to connect stations avoided. This is essential for long or many-stationed networks since each T-junction introduces about 0.2 ohms into the network cable resistance. A socket should be connected to each end of the cable to plug in a terminator. The socket for the clock is most usefully connected roughly half way along the cable. Other sockets are connected to the cable where a station is required. Note that any branches or spurs should be less than 2 metres long. Thus the wire connecting an Econet station to the network should be less than 2 metres long. The siting of the station sockets should be carefully planned so as to minimise spur lengths.</p><p>75 Figure 8.1 Econet network layout</p><p>Figure 8.2 DIN pin number allocations</p><p>76 8.3 Setting up the network</p><p>By now you should be able to lay the main network cable and connect the DIN sockets. Before using the system you must do the following: (1) Connect a terminator at each end of the cable, and connect the terminators to an 8 volt power supply. Connection of the supply to the terminators is indicated by a small red LED (light) near the power supply socket. (2) Select a suitable clock rate. The clock rate you should select will depend upon distance from the clock to the furthest station. Using the clock rates available with the Acorn clock box, recommended maximum clock rates for different distances (in metres) are: Distance Maximum clock rate 100 307K 150 230K 240 153K 330 115K 500 76K</p><p>The following formula can be used to calculate the upper limit of the clock rate for a given clock to furthest station distance: Rate = (velocity of signal in cable)/(distance </p><p>� 4) which for the BICC cable becomes:</p><p>Rate = 42 E6/(network length) In practice a lower rate is often more reliable. The maximum clock rate is 307K for BBC Machines and System 5�s and 200K for the ATOM and Systems 3 and 4. The minimum clock rate, imposed by the Econet hardware, is 70K. To select a clock rate you will need to get inside the clock box. To do this remove the four screws, one in each corner of the base of the box. Carefully remove the top section of the box. In the middle of the circuit board in the box you should see two parallel rows of pins and a connector linking two of the pins. By the side of the rows of pins there is a series of numbers printed on the circuit board. These are the available clock rates. To select a given rate remove the connector from its 77 present position and use it to connect the two pins to the right of the required rate. This is shown in figure 8.3, below, where a clock rate of 153KHz has been selected. (3) Connect the clock to the network, as close as possible to the centre of the cable for maximum speed. Connect an 8 volt power supply to the clock. A small red LED near the power supply socket will light to indicate that the supply is connected. (4) Each station connected to the network must have a unique identity code hardwired onto its Econet interface card. This is achieved by bridging pairs of pins on two parallel rows of eight pins. The eight pins form a binary number, where a bridge is placed, the corresponding bit in the station number will be zero. This is illustrated in figure 8.4, where station number 15 has been set-up. The net will not work if two stations with the same station number are connected. Note that the following default station numbers are reserved: 254 = file server 235 = printer server and station numbers 240 to 254 are privileged in that other stations cannot protect themselves from these stations (see section 5.7.2).</p><p>78 Figure 8.3 Selecting clock rate</p><p>Figure 8.4 Selecting station identity number</p><p>79 8.4 Fault Diagnosis</p><p>If the network fails to operate when attempting to communicate with either the file server, the printer server or another station, then the following problems could be occuring:</p><p>"No Clock� message</p><p>This indicates that there is no clock signal reaching the Econet interface circuits. Check: (1) Are you plugged into the network? (2) Is power connected to the clock box? (Check the power indication LED). (3) Is the clock box connected to the network? (4) Are the clock lines open or shorted?</p><p>�Net Error� message </p><p>Check</p><p>(1) Is the clock speed suitable (see section 8.3)? (2) Are the terminators connected to a power supply? (Check the LEDs) (3) Are the terminators connected to the network? (4) Is there network fault, e.g. short circuit, open circuit or crossed wires?</p><p>"Line jammed" message</p><p>This means that there is continuous information on the data lines. Do the following, testing to see if the fault is remedied after each stage. (1) Reset all stations connected to the network. (2) Remove all other stations from the network. (3) Check for faulty terminators. (4) Check for crossed wires in the network cable. (5) Check for faulty local station.</p><p>"NOT LISTENING� message </p><p>Check:</p><p>(1) Are you sending your message to the correct station? (2) Is the remote station plugged into the network, powered-up and in Econet mode? (3) Is the network cable faulty? (4) Is the local or remote station faulty?</p><p>�NO REPLY� message </p><p>Check:</p><p>80 Remote station has an attached and enabled peripheral, e.g. printer (is it switched on?), Disc drive etc.</p><p>81 9 Selecting a filing system</p><p>9.1 The BBC Microcomputer</p><p>The BBC Microcomputer can have several filing systems available other than the Econet system. The following commands are all used to exit from the current filing system into the one named.</p><p>�TAPE3 300 baud cassette �TAPE12 1200 baud cassette �TAPE 1200 baud cassette �NET Econet filing system �TELESOFT The telesoft mode of the prestel and teletext system �TELETEXT The terminal mode of the teletext system �PRESTEL The terminal mode of the Prestel system �ROM The cartridge ROM system �DISC The disc filing system �DISK Alternative spelling for above</p><p>Typing the command to enter the system you are already in has no effect. If you type the command to enter a filing system for which your computer is not equipped (i.e. you do not have the relevant filing system ROM) then the computer will respond with either Bad command or</p><p>No filing system since it does not recognise the command.</p><p>9.2 Systems To return to the disc operating system and not reset the computer type </p><p>�DOS</p><p>To return to the disc operating system and reset the computer press and hold DELETE and then press BREAK.</p><p>9.3 ATOMs To return an ATOM to the cassette operating system type </p><p>�COS to reset the computer and return to the cassette system press and hold SHIFT and press BREAK (while still holding SHIFT).</p><p>82 10 ECONET Primitives - Version 3</p><p>10.1 Introduction</p><p>The ECONET primitives are the basic operations which can be performed on the network to pass data and control between stations. These primitives will be implemented on the BBC Machine, and consequently, all address pointers are 32 bits long (to accomodate the address range of a 16 bit language processor). The bytes of these addresses will always be in 6502 order, i.e lsb first, and in this document will be labelled 0 to 3 for lsb to msb. The primitives are slightly different for the ATOM/Systems and these differences are shown in this chapter. This chapter only gives details of the primitives, the methods of calling the various functions are dealt with in chapters 11 and 12.</p><p>10.2 TRANSMIT </p><p>10.2.1 Purpose</p><p>The TRANSMIT function sends a block of data from a buffer in one station to another station on the network. The receiving station must be expecting the message (see section 10.3) and the function will indicate if the message was successfully received.</p><p>10.2.2 The TRANSMIT Control Block</p><p>Arguments are passed to TRANSMIT in the form of a control block which can be set up anywhere in memory.</p><p>83 Transmit control block layout:</p><p>BBC Microcomputer ATOMS and Systems</p><p>NOTE that buffer end = buffer + length, and that the buffer length must be positive, non-zero.</p><p>The STATION NUMBER is the station which is supposed to receive the message. Station numbers of zero and 255 are reserved as broadcast numbers. The PORT NUMBER can be used to associate the data in the message with some task or process. The receiving station can be set up to listen for messages on a specific port or to any message addressed to it regardless of port number. If the receiving station is not listening to the port associated with the message, the message will not get 84 through. Note that the port number is purely a software device and should not be confused with hardware I/O ports. Ports �90 to 69F and �D0 and �D1 are used by the network filing system and should not be interferred with.</p><p>The CONTROL BYTE is a seven bit code which is sent to the receive block in the distant station.</p><p>10.2.3 Return from TRANSMIT When transmission has completed, the control byte of the control block is altered. Bit 7 = 0 => transmission has completed (BBC Machine only) Bit 6 = 0 => Success Bit 6 = 1 => Failure Bit 5 will always be zero after a transmission.</p><p>On the BBC Machine, bits 0 to 4 will contain an error code if the transmission failed, or zero if the transmission was successful. In ATOM and SYSTEM implementations, these bits will be undefined after a transmission. Low-level protocols have the characteristic that a failed transmit may, in fact, have been successfully received. Care should be taken that machines do not get out of step (see sections 13.9.8 and 13.9.9 for examples). In the ATOM and SYSTEM, transmission will have completed when control returns from the transmit call, and bit 7 is therefore undefined after transmission. In the BBC Machine, transmission may continue asynchronously, and bit 7 must be polled to determine when a transmission has completed ( see section 11.2).</p><p>10.3 RECEIVING Messages</p><p>10.3.1 Introduction Receiving into a non-BBC machine will be done by updating a data structure set up by the user. In the BBC machine, this data structure must be administered by the ECONET software itself, and accessed by operating system calls.</p><p>85 10.3.2 The RECEIVE CONTROL BLOCK</p><p>To receive data, a receive control block must be set up. Its format follows:</p><p>The FLAG byte indicates the state of the RXCB. It should initially be set to �7F to indicate readiness to receive, will be altered on reception (see 10.3.4).</p><p>The STATION number indicates what station the control block will accept messages from. If this is 0, it will accept messages from any station (but only on the specified port). The PORT number indicates on which port messages will be accepted. A port number of 0 indicates any port.</p><p>86 Both the station and port can be zero, and the station will then accept any message which is addressed to it from any station on any port.</p><p>10.3.3 The Receive Control Block After Reception</p><p>After a message is received, the following changes will occur to fields in the control block which accepted the message:</p><p>1) The top bit of the flag byte is set. The rest of the byte contains the control code sent from byte 0 of the corresponding transmit control block. 2) The station number, if originally zero, is modified to indicate which station actually sent the received message.</p><p>3) The port number, if originally zero, is modified to indicate the port of the received message.</p><p>4) The Buffer End pointer (both bytes) is modified to point to the end of the message in the buffer, if the message length is shorter than the buffer length. Note that messages longer than the buffer length will not be accepted. The �end of the message� is the byte after the last byte of the message.</p><p>10.4 Broadcast If a station sets up a suitable control block, as given below, the data within the block can be received by ANY BBC Machine with a suitable receive block set up (the broadcast facility is not available for ATOM and SYSTEM computers). The receive block must be set up to listen to station �FF or station �00 and with the correct port (or port 0). The TRANSMIT control block for broadcast is:</p><p>87 10.5 Immediate Operations</p><p>10.5.1 Introduction The following primitives differ from receive and transmit in that the station invoking the operation does not need the cooperation of the distant station.</p><p>88 10.5.2 PEEK</p><p>Takes a block of memory from the remote machine and puts it in a buffer in the local machine.</p><p>Control block:</p><p>89</p><p>Bytes 1-2 = standard RX header " 3+ = depends on command</p><p>13.5 Simple Commands</p><p>These commands require no further information from the client after the initial exchange of messages, the operation being executed by the file server on receipt of a command line.</p><p>�ACCESS �BYE �CDIR �DELETE �NEWUSER �PASS �PRIV �REMUSER</p><p>13.6 SAVE - command code 1</p><p>Requests to save a file can be generated either by a command, or from within a program. The SAVE interface can therefore be seen in two sections, one dealing with the command line, the second dealing with a request from within a program.</p><p>1/ Client -> File Server (command port)</p><p>Bytes 1-5 = standard TX header " 6+ = command line</p><p>2/ File Server -> Client (reply port) Bytes 1-2 = standard RX header " 3-6 = load address of file " 7-10 = execute address of file " 11-13 = size of file " 14+ = file title terminated CR A save request from within a program starts at step 3. </p><p>3/ Client -> File Server (command port)</p><p>Bytes 1-5 = standard TX header BUT with acknowledge port in byte normally reserved for URD handle. " 6-9 = load address of file. " 10-13 = execute address of file " 14-16 = size of file " 17+ = file title terminated CR</p><p>4/ File Server -> Client (reply port) Bytes 1-2 = standard RX header Byte 3 = data port Butes 4-5 = Block size</p><p>5/ Client -> File Server (data port) 91 Block of data, "block size" long. If the file size is zero, go to step 7.</p><p>6/ File Server -> Client (acknowledge port) </p><p>Single byte, value undefined.</p><p>Client continues to send data and receive acknowledges until all data has been sent. Step 6 is missed out after the last block has been sent, and the final acknowledge is as follows:</p><p>7/ File Server -> Client (reply port)</p><p>Bytes 1-2 = standard RX header Byte 3 = Access byte (bottom 5 bits in order LWRWR) Bytes 4-5 = Date (format as in section 3.2)</p><p>NOTE - if an error occurs at the file server end during the transfer, it will continue to receive blocks, but do nothing with them, and the nature of the error will be indicated in the final reply.</p><p>13.7 LOAD - command code 2</p><p>As with SAVE, LOAD can have two stages of operation. Firstly the decoding of a LOAD command line, and secondly the LOAD operation itself, which may be generated from within a program.</p><p>1/ Client -> File Server (command port)</p><p>Bytes 1-2 = standard TX header " 6+ = command line</p><p>2/ File Server -> Client (reply port)</p><p>Bytes 1-2 = standard RX header " 3-6 = load address found in command line. Byte 7 = FLAG (�FF or �00) Bytes 8+ = file title, terminated CR The FLAG indicates whether a load address was found in the command line. If so, it is �FF, if not �00. If the flag is 0, the load address is undefined.</p><p>The LOAD operation starts at step 3.</p><p>3/ Client -> File Server (command port)</p><p>Bytes 1-5 = Standard TX header BUT data port in URD slot " 6+ = file title, terminated CR</p><p>4/ File Server -> Client (reply port)</p><p>Bytes 1-2 = Standard RX header 92 " 3-6 = File load address " 7-10 = File exectute address " 11-13 = File size " 14 = Access (as for SAVE) 15-16 = Date (as for SAVE)</p><p>5/ File Server -> Client (data port)</p><p>Data blocks, size undefined, until all data has been received ( determined from file size). If file size is zero, go to step 6. 6/ File Server -> Client (reply port) </p><p>Bytes 1-2 = Standard RX header</p><p>As for SAVE, if an error occurs during the data transfer, "dummy" blocks will continue to be sent, and the error will be indicated in the final reply message.</p><p>13.8 Other Command Line Operations</p><p>All the following commands start by sending the command line to the file server on the command port. The reply, however, contains information which may be used at the client end. These replies are described below: �INFO - command code 4</p><p>Bytes 1-2 = Standard RX header " 3+ = Character string of information terminated by �80.</p><p>The information is formatted for use on Acorn machines. </p><p>�DIR - command code 7</p><p>Bytes 1-2 = Standard RX header Byte 3 = Handle for new CSD</p><p>�SDISC - command code 6 Bytes 1-2 = Standard RX header Byte 3 = Handle for new URD " 4 = Handle for new CSD " 5 = Handle for new LIB</p><p>�I AM - command code 5</p><p>Bytes 1-2 = Standard RX header Byte 3 = Handle for new URD " 4 = Handle for new CSD 5 = Handle for new LIB " 6 = Boot option (lo 4 bits relevant)</p><p>�LIB - command code 9 93 Bytes 1-2 = Standard RX header Byte 3 = Handle for new LIB</p><p>UNRECOGNISED COMMAND - command code 8</p><p>Bytes 1-2 = Standard RX header " 3+ = Command string, terminated CR.</p><p>13.9 Other Functions</p><p>These functions are designed for use from programs rather than typed commands and are identified by a function code other than zero.</p><p>Function codes Code Function 0 Command line decoding (see sections 13.4 to 13.8) 1 Save 2 Load 3 Examine 4 Catalogue header 5 Load as command 6 Find (OPEN) 7 Shut (CLOSE) 8 Get byte 9 Put byte 10 Get bytes 11 Put bytes 12 Read random access info. 13 Set random access info. 14 Read disc info. 15 Read logged on users 16 Read date/time 17 Read "end-of-file" status 18 Read object info. 19 Set object info. 20 Delete object 21 Read user environment 22 Set user option bits 23 log off 24 Read user info. 25 Read file server version number</p><p>These commands are discussed in the following sections.</p><p>13.9.1 Save - code 1</p><p>This is dealt with in section 13.6.</p><p>13.9.2 Load - code 2</p><p>This is dealt with in section 13.7 94 13.9.3 Examine - code 3</p><p>1/ Client -> File Server (command port)</p><p>Bytes 1-5 = Standard TX header Byte 6 = ARG to examine ▪ 7= entry point to directory ▪ 8= number of entries 9+ = name of directory to be examined</p><p>ARG defines the type of information to be returned by the file server.</p><p>ARG = 0 => all information, m/c readable ARG = 1 => all information, character string ARG = 2 => file title only ARG = 3 => access + file title, character string.</p><p>ENTRY POINT - entry number in directory from which examine will take place.</p><p>NUMBER OF ENTRIES - how many entries are to be examined.</p><p>2/ File Server -> Client</p><p>Bytes 1-2 = Standard RX header Byte 3 = number of entries examined Bytes 4+ = depend on ARG.</p><p>A number of entries will be sent (byte 3). The machine readable forms are a defined number of bytes, and therefore no delimiters occur between them. To allow easy display of the character forms, entries are delimited by a zero byte, and may include carriage returns.</p><p>13.9.3.1 ARG = 0</p><p>Bytes 4-13 = File title, padded with spaces " 14-17 = Load address " 18-21 = Execute address Byte 22 = Access LWR/WR - bottom 5 bits Bytes23-24 = Date</p><p>23 - day 24 - year since 81 (4bits)/month (4bits)</p><p>" 25-27 = System Internal Name " 28-30 = Size of file</p><p>95 13.9.3.2 ARG = 1</p><p>Bytes 4+ = character string of all information.</p><p>Each entry is delimited by a zero byte, and the end of all information is indicated by a �80 byte after the final zero.</p><p>13.9.3.3 ARG = 2</p><p>Byte 4 = 10 (use by BBC Micro. OS) Bytes 5-14 = File title padded with spaces</p><p>13.9.3.4 ARG = 3 </p><p>Bytes 4+ = File title followed by formatted access string. Entry delimiters and final delimiter as with ARG = 1.</p><p>13.9.4 Catalogue Header - code 4</p><p>1/ Client -> File Server (command port)</p><p>Bytes 1-5 = Standard TX header " 6+ = File title (possibly just CR)</p><p>2/ File Server -> Client (reply port)</p><p>Bytes 1-2 = Standard RX header " 3+ = Last component of file title Ownership of directory character Current Disc name Formatted as a character string</p><p>13.9.5 Load as command - code 5</p><p>1/ Client -> File server (command port)</p><p>Bytes 1-5 = Standard TX header " 6+= File name</p><p>Remaining steps exactly as for LOAD, except that the file title is looked up in several directories (as described in section 2.6), rather than just the current one.</p><p>13.9.6 Find(OPEN) - code 6</p><p>Opens a file for reading or updating, returning a handle which can be used for getting and putting byte(s). 96 1/ Client -> File Server (Command port) Bytes 1-5 = Standard TX header " 6 = 0 - file need not already exist, and will be created 1 - file must already exist 7 = 0 - opening for update, 1 - opening for reading only " 8+ = File/dir. title</p><p>2/ File Server -> Client (reply port)</p><p>Bytes 1-2 = Standard RX header Byte 3 = Handle</p><p>The file will be opened only if the user has sufficient access. A file may be opened several times for reading, but only once for updating ( see section 2.10.5). The file will be created with a default size of 1K if: a) it doesn�t already exist b) it is opened for update c) the user specified that it need not exist</p><p>13.9.7 Shut (CLOSE) -code 7</p><p>Closes an open file.</p><p>1/ Client -> File Server (command port)</p><p>Bytes 1-5 = Standard TX header Byte 6 = Handle</p><p>2/ File Server -> Client (reply port)</p><p>Bytes 1-2 = Standard RX header</p><p>All updated blocks will be written to the file before it is closed.</p><p>13.9.8 Get byte - code 8</p><p>Reads a single byte from file.</p><p>1/ Client -> File Server (command port)</p><p>Byte 1 = Reply port Byte 2 = function code (8) Byte 3 = File handle</p><p>2/ File Server -> Client (reply port)</p><p>Byte 1 = command code = 0 Byte 2 = Return code 97 Byte 3 = Byte read or �FF if first byte after file Byte 4 = Flag The flag will be as follows: �00 - normal read byte �80 - if this is the last byte �C0 - if this is the first byte after the end of the file</p><p>The sequence number is explained in the next section.</p><p>13.9.9 Put byte - code 9</p><p>Write a single byte to a file</p><p>1/ Client -> File server (command port) Byte 1 = Reply port Byte 2 = Function code (9) Byte 3 = File handle Byte 4 = Byte to be written</p><p>In addition, the least-significant bit of the 7-bit control code in the Econet control block is a sequence number for the operation (0 or 1). 2/ File server -> Client (reply port)</p><p>Byte 1 = command code = 0 Byte 2 = Return code</p><p>The sequence number is necessary because it is the file server which remembers the current file position. If the file server gets the sequence number it is expecting, it increments the file pointer by one and increments (i.e. inverts) its copy of the sequence number. If the file server receives the wrong sequence number, it assumes that this is a repeat of the last operation and so does not change either the file pointer or the sequence number. The file server returns the sequence number in the control byte of the control block. After opening a file the first sequence number is expected to be zero.</p><p>The client should be prepared to repeat a call if it gets no reply, or one with the wrong sequence number. The client must increment its sequence number when it has successfully completed an operation.</p><p>13.9.10 Get bytes and Put bytes - codes 10 and 11 </p><p>Read/write a group of bytes 1/ Client -> file server (command port) Byte 1 = Reply port Byte 2 = Function code (10 or 11) Byte 3 = Data/acknowledge port Byte 4 = File handle Byte 5 = Flag - 0 to use given offset, non-zero to use sequential pointer 98 Bytes 6-8 = Number of bytes to transfer Bytes 9-11 = Offset in file if required</p><p>There is also a sequence number held in the least-significant bit of the Econet control block�s control code.</p><p>2/ File server -> Client first reply Byte 1 = Command code = 0 Byte 2 = Return code Byte 3 = Data port (put byte only) Bytes 4-5 = Maximum block size written (put byte only)</p><p>There then follows a data transfer as for LOAD and SAVE. If the file size is zero, the data transfer steps are not executed.</p><p>3/ File server -> Client second reply Byte 1 = Command code = 0 Byte 2 = Return code Byte 3 = Flag - 0 if all O.K., �80 if this read includes last byte (always zero for putbytes). Bytes 4-6 = number of bytes aotually transferred</p><p>The client must maintain a sequence number as for Getbyte and Putbyte.</p><p>13.9.11 Read random access info - code 12 1/ Client -> File server (command port) Bytes 1-5 = Standard TX header Byte 6 = file handle Byte 7 = ARG ARG=0 - read file pointer ARG=1 - read file extent ARG=2 - read file size 2/ File Server -> Client (reply port) Bytes 1-2 = Standard RX header bytes 3-5 = Information reutned (lo byte first)</p><p>13.9.12 Set random access info - code 13 </p><p>1/ Client -> File server (command port)</p><p>Bytes 1-5 = Standard TX header Byte 6 = File handle Byte 7 = ARG ARG=0 - set sequential pointer Byte 8-10 = Value to be set (lo first)</p><p>2/ File server -> Client (reply port) </p><p>Bytes 1-2 = Standard RX header</p><p>99 13.9.13 Read disc info - code 14</p><p>1/ Client -> file server (command port)</p><p>Bytes 1-5 = Standard TX header Byte 6 = first drive number to get info on Byte 7 = number of drives to get info on</p><p>2/ File server -> Client (reply port) Bytes 1-2 = Standard RX header Byte 3 = number of drives found Byte 4 = Drive number of first drive requested Bytes 5-20= Disc name on drive padded with spaces Byte 21 = Drive number of second drive requested Bytes 22-37= Disc name on second drive Bytes 38+ = Info on remaining drives in same format</p><p>Generally only two drives are present, but the interface will cope with any number. 13.9.14 Read logged on users - code 15 1/ </p><p>Client -> File server (command port)</p><p>Bytes 1-5 = Standard TX header Byte 6 = First user entry to get info on Byte 7 = number of user entries to examine</p><p>2/ File server -> Client (reply port) Bytes 1-2 = Standard RX header Byte 3 = number of users found Bytes 4-5 = machine number where user logged on (lo then hi) Bytes 6-15 = User id. padded with spaces Byte 16 = privilege of user - 0 unprivileged, non-0 if privileged Bytes 17+ = Further entries in same format</p><p>Note that the number of users found will be zero if the first user entry to be examined is greater than the number of users logged on.</p><p>13.9.15 Read data and time - code 16</p><p>1/ Client -> File server (command port) Bytes 1-5 = Standard TX header </p><p>2/ File server -> Client (reply port)</p><p>Bytes 1-2 = Standard RX header Bytes 3-4 = Date, standard format: byte 3 - days byte 4 (lo bits) = month byte 4 (hi bits) = years since 1981 Bytes 5-7 = 0 if no time-board attached to file server byte 5 - hours byte 6 - minutes 100 byte 7 - seconds if time board attached</p><p>13.9.16 Read �end of file� status - code 17</p><p>1/ Client -> file server (command port)</p><p>Bytes 1-5 = Standard TX header Byte 6 = Handle of file</p><p>2/ File server -> Client (reply port)</p><p>Bytes 1-2 = Standard RX header Byte 3 = �FF if file pointer is outside file �00 otherwise</p><p>13.9.17 Read object info - code 18</p><p>1/ Client -> file server (command port) Bytes 1-5 = Standard TX header Byte 6 = ARG ARG = 1 - Read creation date ARG = 2 - read load and execute address (8 bytes) ARG = 3 - read size (3 bytes) ARG = 4 - read type/access byte ARG = 5 - read all file attributes ARG = 6 - read access/cycle/dir. name of given dir. Bytes 7+ = Object name (terminated by CR)</p><p>Note - format of access/type byte: bits 0-1 = public RW bits 2-3 = owner RW bit 4 = locked bit 5 = type (1 = dir., 0 = file) Result from file server depends upon ARG: </p><p>ARG = 1-5</p><p>File server -> Client (reply port) Bytes 1-2 = Standard RX header Byte 3 = 0 if object doesn�t exist �FF if object does exist Bytes 4+ = results (in order load/execute/size/access/date)</p><p>ARG = 6 File server -> Client (reply port)</p><p>Bytes 1-2 = Standard RX header Byte 3 = Unused Bytes 4-5 = 0 and 10 (used by BBC Micro NFS only) Bytes 6-15 = Dir. name padded with spaces Byte 16 = Access to dir. (0 - owner, �FF - public) 101 Byte 17 = Cycle number of dir.</p><p>13.9.18 Set file info - code 19</p><p>1/ Client -> file server (command port) Bytes 1-5 = Standard TX header Byte 6 = ARG ARG = 1 - set load/execute/access ARG = 2 - set load address ARG = 3 - set exec. address ARG = 4 - set access byte Bytes 7+ = details to set (size depends on ARG) Bytes n+ = file name (terminated by CR)</p><p>2/ File server -> Client (reply port) </p><p>Bytes 1-2 = Standard RX header</p><p>13.9.19 Delete object - code 20</p><p>1/ Client -> file server (command port)</p><p>Bytes 1-5 = Standard TX header Bytes 6+ = Object name (terminated by CR)</p><p>2/ File server -> Client (reply port)</p><p>Bytes 1-2 = Standard RX header Bytes 3+ = load/exec/size</p><p>13.9.20 Read user environment - code 21 1/ Client -> file server (command port) </p><p>Bytes 1-5 = Standard TX header 2/ </p><p>File server -> Client (reply port)</p><p>Bytes 1-2 = Standard RX header Byte 3 = length of disc name Bytes 4-19= Currently selected disc name, padded with spaces Bytes 20-29= CSD name, padded with spaces Bytes 30-39= Library name, padded with spaces</p><p>13.9.21 Set user option - code 22 1/ Client -> file server (command port)</p><p>Bytes 1-5 = Standard TX header Byte 6 = New boot option (lower 4 bits)</p><p>2/ File server -> Client (reply port) </p><p>102 Bytes 1-2 = Standard RX header 13.9.22 Log-off - code 23 1/ Client -> File server (command port) </p><p>Bytes 1-5 = Standard TX header 2/ </p><p>File server -> Client</p><p>Bytes 1-2 = Standard RX header</p><p>13.9.23 Read user info - code 24</p><p>1/ Client -> file server (command port) Bytes 1-5 = Standard TX header Bytes 6+ = User name, terminated by CR</p><p>2/ File server -> client (reply port) Bytes 1-2 = standard RX header Byte 3 = User privilege (0 - unprivileged, non-0 - privileged) Bytes 4-5 = Machine number logged on (lo byte first) An error will be returned if the user is not logged on. </p><p>13.9.24 Read File Server version number - code 25 1/ </p><p>Client -> File server (command port)</p><p>Bytes 1-5 = Standard TX header</p><p>2/ File server -> client (reply port) Bytes 1-2 = Standard RX header Bytes 3+ = Character string describing version, terminated by CR.</p><p>103 Appendix A - Summary of the Filing System</p><p>This appendix is intended to be a quick overview of the file server for people who have some experience of filing systems, and who wish to get a general idea of the capabilities and style of the ACORN file server.</p><p>The ACORN File Server provides a hierarchical directory structure, each directory containing entries which may be files, or further directories. A FILE is simply a copy of a block of memory of variable size, with a load address specifying where it should be loaded, and an execute address, specifying. where execution should start if the file is loaded as a program. In addition to load and execution addresses, the size of the file and the date it was created (last SAVED) are stored in the directory entry.</p><p>The file server can support multiple drives, each physical disc on the system being viewed as a complete logical filing system. Each user can select which filing system he wishes to use by specifying the name of the disc he requires (see �SDISC command). The base of the hierarchy on each disc is the ROOT directory, which is created on the disc when it is initialised. In general each user of a disc will have a directory in the ROOT (the Users Root Directory - URD) which is the base of his own hierachy of files and directories. Files are referred to by a file title made up of sections separated by ".". Each section corresponds to a level of the hierarchy, the root being referred to by the "$" character. Thus $.JOEY.MYFILE refers to a file (or directory) MYFILE in directory JOEY, which is itself an entry in the root directory ($)• It is also possible to "select" a directory and refer to files from that directory, rather than through the root. For example MYFILE would refer to the same Object as mentioned above, if $.JOEY was the selected directory. When a user logs on or selects a disc, his URD becomes the Currently Selected Directory (CSD) if it exists, otherwise, the ROOT itself becomes the CSD. Each entry in a directory has an ACCESS field which allows protection from deletion (the LOCK facility), and reading and writing by both other users of the file system, and the directory owner. System privileged users can be created who have owner access to the whole filing system.</p><p>104 Appendix B - List of Commands</p><p>Command Abbrev. Syntax</p><p>�ACCESS �A. �A. <file title> <access string></p><p>�BYE �BY. �BY.</p><p>�CAT �. �. <opt. file title></p><p>�CDIR �CD. �CD. <file title></p><p>�DELETE �D. �D. <file title></p><p>�DIR �DIR �DIR <opt. file title></p><p>�DISCS �DISCS �DISCS</p><p>�EXEC �E. �E. <file name></p><p>�I AM �I A. �I AM <user id.></p><p>�INFO �I. �I. <file name></p><p>�LIB �LIB �LIB <dir></p><p>�LOAD �L. �L. <file title> <opt. address></p><p>�NEWUSER �N. �N. <user id></p><p>�OPT �0. �O. m,n</p><p>�PASS �P. �P. <old pw> <new pw></p><p>�PRIV �PR. �PR. <user id> <priv. char></p><p>�REMUSER �REM. �REM. <user id></p><p>�RENAME �R. �R. <old file title> <new file title></p><p>�SAVE �S. �S. <file title> <addr.> <addr.> <opt. addr.></p><p>�SDISC �SDI. �SDI. <disc name></p><p>�SPOOL �SP. �SP. <file name></p><p>�USERS �USERS �USERS</p><p>105 Appendix C - Error numbers</p><p>The word �object� in the following descriptions refers to a file or a directory.</p><p>ERR (hex) Description 13 USRMAN.RESTART called twice 14 Object not a directory 15 User not logged on 16 Machine zero is invalid 21 Cannot find password file 27 Password file syntax error 29 Object "$.PASSWORDS" has wrong type 31 STRMAN.RESTART called twice 32 SIN = 0 33 REF COUNT = �FF 34 REF COUNT = zero 35 File too big or zero length 36 Invalid window address 37 No free cache descriptors 38 Window ref count > 0 39 Big buffer already in use 3A Invalid buffer address 3B Ref. count = �FF 3C Store deadlock 3D Arith. overflow</p><p>42 Broken directory 46 Attempting to set WR attributes to a directory 48 Not defined 4C No write access 4E Too many entries asked for in EXAMINE 4F Bad ARG to EXAMINE. 53 SIN not for start of chain 54 Disc not a file server disc 55 Both sector maps corrupt 56 Illegal drive number 57 Map seq. nos. differ by >1 58 Object size zero 59 New map doesn�t fit in old space 5A Disc of same name already in use 61 RNDMAN.RESTART called twice 64 All handles open - handle table full 65 Object not open 66 Cannot copy file handles 67 RANDTB full 69 Object not a file 6D Invalid arg to RDSTAR 6F GETBYTE; byte after last in file</p><p>71 Invalid number of sectors 72 Store address overflow 106 73 Accessing beyond file end 74 Invalid SIN 83 Too much data from client (SAVE) 84 Wait bombs out 85 Invalid function code 86 Undefined 8A File too big 8C Bad privilege letter 8D Excess data in PUTBYTES 8E Bad INFO argument 8F Bad arq to RDAR AO Line jammed A1 Net error A2 Not listening A3 No clock A4 Bad TXCB A5 No reply AD Mode x AE User not logged on AF Types don�t match B0 Renaming across two discs B1 User id. already exists B2 Password file full B3 Maximum directory size reached B4 Directory not empty B5 Trying to load a directory B6 Disc error on map read/write B7 Attempt to point outside a file B8 Too many users B9 Bad password BA Insufficient privelege BB Inoorrect password BC User not known BD Insufficient access BE Object not a directory BF Who are you? CO Too many open files C1 File not open for update C2 Already open C3 Entry locked C6 Disc full C7 Unrecoverable disc error C8 Disc number not found C9 Disc protected CC Bad file name CF Invalid access string D6 Not found DE Channel DF End of file</p><p>FD Bad string (filename etc.) FE Bad command</p><p>107 Appendix D - BBC Microcomputer Machine Operating System calls</p><p>This appendix lists the machine operating system calls used specifically with the Econet filing system.</p><p>OSBYTE calls</p><p>Call Function Hex Decimal 32 50 Poll transmit block 33 51 Poll receive block 34 52 Delete receive block 35 53 Sever REMOTE connection</p><p>OSWORD calls</p><p>Call Function Hex Decimal 10 16 Call TRANSMIT 11 17 Open/read receive block 12 18 Read remote routine arguments 13 19 Read/set miscellaneous net information 14 20 Call file server/remote machine</p><p>EVENTS</p><p>Number Event 8 Remote procedure call</p><p>108 </p> </div> </article> </div> </div> </div> <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.6.1/jquery.min.js" crossorigin="anonymous" referrerpolicy="no-referrer"></script> <script> var docId = 'd245798de4d47e3f8db6f064f8b33464'; var endPage = 1; var totalPage = 109; var pfLoading = false; window.addEventListener('scroll', function () { if (pfLoading) return; var $now = $('.article-imgview .pf').eq(endPage - 1); if (document.documentElement.scrollTop + $(window).height() > $now.offset().top) { pfLoading = true; endPage++; if (endPage > totalPage) return; var imgEle = new Image(); var imgsrc = "//data.docslib.org/img/d245798de4d47e3f8db6f064f8b33464-" + endPage + (endPage > 3 ? ".jpg" : ".webp"); imgEle.src = imgsrc; var $imgLoad = $('<div class="pf" id="pf' + endPage + '"><img src="/loading.gif"></div>'); $('.article-imgview').append($imgLoad); imgEle.addEventListener('load', function () { $imgLoad.find('img').attr('src', imgsrc); pfLoading = false }); if (endPage < 5) { adcall('pf' + endPage); } } }, { passive: true }); if (totalPage > 0) adcall('pf1'); </script> <script> var sc_project = 11552861; var sc_invisible = 1; var sc_security = "b956b151"; </script> <script src="https://www.statcounter.com/counter/counter.js" async></script> </html>