© Copyright 1988 Locomotive Software Limited
Sections of the text: © 1985, 1987 AMSTRAD plc
All rights reserved.
Neither the whole, nor any part of the information contained in this manual may be adapted or reproduced in any material form except with the prior written approval of Locomotive Software Limited.
While every effort has been made to verify that this software works as described, it is not possible to test any program of this complexity under all possible circumstances. Therefore the software supplied in this package is provided 'as is' without warranty of any kind either express or implied.
The particulars supplied in this manual are given by Locomotive Software in good faith. However, the software described is subject to continuous development and improvement , and it is acknowledged that there may be errors or omissions in this manual. In particular, the messages shown in this manual may differ in detail from those actually shown on the screen.
Locomotive Software reserves the right to revise this manual without notice.
Written and edited by Jean Gilmour, Locomotive Software
(Includes material written for AMSTRAD plc and material written by Ed Phipps Documentation Services for Locomotive Software)
Produced and typeset electronically by Locomotive Software Ltd
Printed by Ashford Colour Press, Gosport, Hants
Published by Locomotive Software Ltd
Surrey RH4 1YL
First Published 1988
ISBN 1 85195 011 7
LOCOMOTIVE and LOCO are registered trademarks of Locomotive Software Ltd
Mallard BASIC is a trademark of Locomotive Software Ltd
AMSTRAD is a registered trademark of AMSTRAD plc
Spectrum +3, PCW8256, PCW8512, PCW9512, CPC6128 are trademarks of AMSTRAD plc
CP/M, CP/M Plus are trademarks of Digital Research Inc
WordStar is a trademark of MicroPro International Corp
VT52 is a trademark of Digital Equipment Corp
Z19, Z29 are trademarks of Zenith Data Systems Inc
CP/M for the Spectrum +3 comprises:
CP/M is an operating system which means that its job is to run programs and help you organise your data. CP/M makes each computer on which it is used behave in the same way. As CP/M is used on many different computers the world over, you will have many thousands of programs from which to choose - programs that might have originally been written with another computer in mind but which will run equally well on your Spectrum +3. These programs might be accountants' spreadsheets or word processors - even computer games (though perhaps without some of the spectacular effects of programs written specifically for the Spectrum).
What is particularly important is that CP/M Plus for the Spectrum +3 is fully compatible with the CP/M for other Amstrad computers - the CPC6128 personal computer and all the PCW machines. So CP/M programs supplied for these computers are automatically set up correctly for running on your Spectrum +3.
One of the main advantages of using a well-established operating system such as CP/M is that it opens up a wide range of professional programming languages to you. Locomotive Software's Mallard BASIC, supplied on the disc alongside CP/M, is just such a programming language.
Mallard BASIC is a powerful modern BASIC with a number of significant improvements. In particular, Mallard BASIC has the very unusual facility (for BASICs on microcomputers) of indexing data stored in a file and automatically keeping this index in alphabetical order. This takes all the hard work out of preparing and using your own database.
In addition, Mallard BASIC will accept programs written for the industry standard Microsoft BASIC with little or no modification.
This User Guide is in three parts:
Part I gives you all the information you need for general use of the CP/M Plus operating system; Part II is specifically to help you use the Mallard BASIC programming language supplied on the disc; Part III provides reference information on CP/M for the Spectrum +3.
Part II provides only an introduction to Mallard BASIC. If you wish to use Mallard to write anything more than very simple programs, we would recommend you to buy a copy of 'Mallard BASIC: Introduction and Reference' (available from Locomotive Software, price £9.95).
The first thing to do is to make a copy of the supplied Master CP/M disc. You need this copy to give yourself a disc to use every day to load CP/M. (Such a disc is often described as a Start-up disc.) The supplied disc shouldn't be used as your Start-up disc because then you would risk damaging the disc and losing all the valuable software on it. Instead, it should be stored safely away, to use only to make another copy if your 'Working' copy gets damaged.
Copying a disc means copying all the data from one disc to another in such a way that the second disc becomes identical to the first. The program that does this is called DISCKIT. To use DISCKIT, you simply load the program and then follow instructions on the screen. The whole process should take about five minutes. The steps to take are given below: these assume that your Spectrum +3 is switched off at the start.
You also need to give yourself a 'Data' disc to store any other programs and data on. It is best not to use your Start-up disc as anything other than the disc you use to load CP/M and its associated 'utility' programs.
You will need two new blank discs for this - one for your copy of the supplied disc, and one for your Data disc.
If all is well, the Spectrum then displays a message like:
CP/M Plus Locomotive Software Ltd vx.x, 61K TPA, 1 disc drive RAMDISC vx.x [size=12k] installedand carries out a few extra commands. Finally it stops, with A> on a fresh line followed by a bright oblong.
If instead the screen flashes red or you see the message Insert TAPE and press PLAY, the disc you've used either isn't suitable for loading in a Spectrum or is damaged in some way. Check that you inserted the correct disc then try again. If it still fails, take the disc back to your dealer.
Copying will now start. You will see the system counting through the numbers 0...39 both as it reads the information on the Master disc and as it writes the copy on the new disc. If you have a single-drive system, copying will take place in a number of parts - each part copying a section of information on the disc to READ (the supplied disc) onto the disc to WRITE (the disc you've labelled 'CP/M Start-up disc'). This involves swapping the disc you have in the drive at various points in the process in response to messages displayed on the screen.
DISCKIT will start to write the information it has copied from the Master disc onto the new disc. If the new disc hasn't yet been marked out ready to store information, DISCKIT will display a message telling you it is 'Going to format the disc in drive A: while copying'.
Insert disc to READ into drive A: Press any key to continueYou must now re-insert the supplied disc so that the second part of the copy can go ahead (press when you have done this). After a while, you will similarly be asked to insert the disc to WRITE again - and so on until the whole of the disc has been copied (four pairs of operations).
If you accidentally mix up the disc you are reading from (the Read disc) and the disc you are writing to (the Write disc) DISCKIT will spot this and display an appropriate message.
Any error messages that appear should also be self explanatory, but if you feel in need of extra help, refer to Part I, Chapter 5 where full details of DISCKIT are given.
Copy completed Remove the disc from the drive Press any key to continueRelease the disc(s) from the drive(s) and press . You have now copied Side 1 of the Master disc onto your CP/M Start-up disc.
Side 2 of the Master disc is copied as before. When a message appears asking you to insert the disc to WRITE, insert your new disc in the drive specified in the message - this time with Side 2 uppermost - and press .
You now need to use DISCKIT to prepare your second blank disc as your Data disc. Important: Do not use a disc that already has information stored on it unless you are sure that you do not want that data. The process described here completely erases any information currently on the disc.
Formatting will now start. You will see the system counting through the numbers 0...39 as it prepares the new disc.
Side 2 of the disc is then formatted as before.
Throughout this user guide, various conventions are used to represent different types of information. The principal conventions are as follows:
The majority of descriptions are explained in the accompanying text. The remainder are self-explanatory.
|1||Introduction to CP/M Plus||1|
|1.2||CP/M and the keyboard||4|
|1.3||CP/M and the screen||5|
|1.4||More about CP/M||9|
|1.5||Some practice in using CP/M||13|
|2.3||Running ready installed software||26|
|2.4||Installing the software||29|
|2.5||Spectrum +3 parameters||29|
|3||Standard 'housekeeping' tasks||33|
|3.1||Assessing the available space||34|
|3.5||Editing the command line||40|
|3.6||Editing text files||41|
|3.8||Finding the size of a file||44|
|3.10||Listing the directory||46|
|3.11||Listing a file||47|
|3.12||Organising your discs||48|
|3.13||Protecting your files||49|
|3.15||Shortening the command line||53|
|3.16||Switching which disc is read or written||56|
|4||Tailoring the Spectrum to your needs||57|
|4.1||Setting up the parallel Printer port||58|
|4.2||Setting up the RS232 port for a serial printer||66|
|4.3||Using your Spectrum +3 for communications||69|
|4.4||Configuring the Memory disc||72|
|4.5||Selecting the appropriate national language||73|
|4.6||Redefining the keyboard||75|
|4.7||Redirecting console input and output||80|
|5||The CP/M built-in commands and utilities||85|
|Alphabetical listing of the commands and utilities, with full descriptions and examples of their use.|
|1||Starting with BASIC||129|
|1.4||Giving BASIC commands||130|
|1.5||Types of information||131|
|2||Starting programming with BASIC||137|
|2.1||A first program||137|
|2.2||More complex programs||139|
|2.3||Changing a program||140|
|3.3||How information is stored||148|
|3.4||Outputting the results||155|
|3.5||Controlling the output device||157|
|4||Writing larger programs||165|
|4.1||Compartmentalising a program||165|
|4.2||Sequences and loops||166|
|4.4||Stopping the program||172|
|4.5||Organising the program||172|
|5.1||Manipulating numeric information||179|
|5.2||Manipulating textual information||182|
|5.3||Converting between different types of information||185|
|6||Using discs for information storage||187|
|6.1||General disc commands||188|
|6.2||Sequential access files||180|
|6.3||Random access files||200|
|7||Keyed access files for data bases||213|
|7.1||Writing a program using Keyed files||215|
|7.2||Working out the main program||216|
|7.4||Adding a record||219|
|7.5||Reading a record||223|
|7.6||Deleting an entry||225|
|7.7||Closing the Keyed file||227|
|8||Machine level operations||239|
|8.2||Applying a Patch||240|
|8.3||Loading a machine code program||241|
|8.4||Using a machine code program||243|
|II||CP/M Plus character set||249|
|II.1||The complete character set||250|
|II.2||The standard CP/M keyboard||257|
|VI.5||Field installable device drivers||317|
|VII.1||Disc handling errors||343|
|VII.3||CP/M Plus error messages||344|