Spectrum +3 CP/M Plus manual (2024)

IndexChapter 1

© 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 adaptedor reproduced in any material form except with the prior written approval of Locomotive SoftwareLimited.

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 thesoftware 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, themessages 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 Servicesfor Locomotive Software)
Produced and typeset electronically by Locomotive Software Ltd
Printed by Ashford Colour Press, Gosport, Hants

Published by Locomotive Software Ltd
Allen Court
Dorking
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 Plus, version 3 of Digital Research's CP/M ('Control Program for Microcomputers')
  • Locomotive Software's Mallard BASIC

CP/M is an operating system which means that its job is to run programs and help you organiseyour 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 whichto choose - programs that might have originally been written with another computer in mind butwhich will run equally well on your Spectrum +3. These programs might be accountants' spreadsheetsor word processors - even computer games (though perhaps without some of the spectacular effectsof programs written specifically for the Spectrum).

What is particularly important is that CP/M Plus for the Spectrum +3 is fully compatible withthe CP/M for other Amstrad computers - the CPC6128 personal computer and all the PCW machines. SoCP/M programs supplied for these computers are automatically set up correctly for running on yourSpectrum +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 MallardBASIC, 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 storedin a file and automatically keeping this index in alphabetical order. This takes all the hard workout 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.

  • We should point out that some keys on the keyboard produce different characters or different actions when you run CP/M and Mallard BASIC to those they have when using SpectrumBASIC. Details of the characters and actions that the keyboard is set up to produce when youuse CP/M are given in Appendix II.

About this User Guide

This User Guide is in three parts:

  • Part I: CP/M Plus - describes how to run the CP/M Plus operating system andhow to use it both to run programs and to carry out a range of standard tasks, such as organising the files on your discs.
  • Part II: Mallard BASIC - describes the facilities provided by Mallard BASIC andshows you how to use these in a way that is suitable for anyone that is new to using this versionof BASIC, including those who have never programmed before.
  • Part III: Appendices - gives detailed information about the version of CP/Mprovided for your Spectrum +3 - the characters you can type and how to type them, the codes usedto control the screen and a full list of system error messages.

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 writeanything 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).

Essential Preparation

The first thing to do is to make a copy of the supplied Master CP/M disc. You need this copyto 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 wouldrisk 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 useDISCKIT, you simply load the program and then follow instructions on the screen. The whole processshould 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 bestnot 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 onefor your Data disc.

Initial steps

  1. Write 'CP/M Start-up disc' on the label on Side 1 of the disc you are going to use as your CP/M Start-up disc.
  2. Write-protect the supplied disc, by ensuring that the Write Protect Holes in thetop corners of the disc (away from the disc label) are open.
    This step is most important as it protects the supplied disc against being accidentallyoverwritten while the disc is being copied.
    • There is a diagram showing the position of the Write Protect Holes and how they open and close in Chapter 5 of the Spectrum +3 User Guide.
  3. Check that there is no disc in the drive; then turn the machine on. Your Spectrum thendisplays its standard Opening Menu.
  4. Hold the supplied master disc by its labelled end with Side 1 uppermost and insert it into the built-in floppy disc drive (Drive A).
  5. Check that the Loader option is highlighted, and then press Spectrum +3 CP/M Plus manual (1). The Spectrum then displays the message Loader and reads from the disc.

    If all is well, the Spectrum then displays a message like:

    CP/M Plus Locomotive Software Ltdvx.x, 61K TPA, 1 disc driveRAMDISC vx.x [size=12k] installed
    and carries out a few extra commands. Finally it stops, with A> on a fresh linefollowed 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 backto your dealer.

Copying the Master disc

  1. Leave the 'Master' CP/M disc in the drive, type DISCKIT (you will see the characters appear on the screen after the A> prompt.) and press the Spectrum +3 CP/M Plus manual (2) key.
  2. Up on the screen will come a series of messages. The first message tells you to remove yourdisc; press Spectrum +3 CP/M Plus manual (3)(say) when you have done this.
  3. The next message offers you the choice of Copy, Format or Verify (or exit from DISCKIT) andtells you which key to press to select each option. In this case, you want Copy, so press the 1 key.
  4. If your Spectrum has two floppy drives, you will be asked which drive you want to read from - press A for Drive A, the built-in disc drive; you will then be asked which drive youwant to write to - press Q for drive B, your second disc drive. If your Spectrum just has one discdrive, this stage is omitted.
  5. The next message that appears asks you to '...put the disc you wish to READ into the drive,then press Y'. In this case, the disc you want to copy is the supplied Master disc, so re-insertthis disc with side 1 uppermost and type Y.

    Copying will now start. You will see the system counting through the numbers 0...39 both as itreads the information on the Master disc and as it writes the copy on the new disc. If you have asingle-drive system, copying will take place in a number of parts - each part copying a section ofinformation on the disc to READ (the supplied disc) onto the disc to WRITE (the disc you'velabelled 'CP/M Start-up disc'). This involves swapping the disc you have in the drive at variouspoints in the process in response to messages displayed on the screen.

  6. When a message appears asking you to insert the disc to WRITE, insert the new blank disc in the drive specified in the message, with Side 1(the side you labelled) uppermost, and pressSpectrum +3 CP/M Plus manual (4).

    DISCKIT will start to write the information it has copied from the Master disc onto the newdisc. If the new disc hasn't yet been marked out ready to store information, DISCKIT will displaya message telling you it is 'Going to format the disc in drive A: while copying'.

  7. On a single-drive machine, the following message will appear after a short while:
    Insert disc to READ into drive A:Press any key to continue
    You must now re-insert the supplied disc so that the second part of the copy can go ahead (press Spectrum +3 CP/M Plus manual (5) when you havedone this). After a while, you will similarly be asked to insert the disc to WRITE again - andso 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 discyou 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 ofextra help, refer to Part I, Chapter 5 where full details of DISCKIT are given.

  8. When copying is complete, you will see the message:
    Copy completedRemove the disc from the drivePress any key to continue
    Release the disc(s) from the drive(s) and press Spectrum +3 CP/M Plus manual (6).You have now copied Side 1 of the Master disc onto your CP/M Start-up disc.
  9. You are next asked whether you want to copy another disc. The second side of the Master disccounts as another disc, so re-insert the Master CP/M disc - this time with Side 2uppermost - and press Y.

    Side 2 of the Master disc is copied as before. When a message appears asking you to insertthe disc to WRITE, insert your new disc in the drive specified in the message - this time withSide 2 uppermost - and press Spectrum +3 CP/M Plus manual (7).

  10. This time when copying has been completed, remove your new disc from the drive and put it to one side;you hae now made your working CP/M Start-up disc. Then press Spectrum +3 CP/M Plus manual (8)twice to return to DISCKIT's main menu.

Preparing a Data disc

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 wantthat data. The process described here completely erases any information currently onthe disc.

  1. The process of preparing a disc is called Formatting, so this time the option you want touse from this menu is Format - ie. press the Q key.
  2. If your Spectrum has two floppy discs, you will be asked which drive you want to format thedisc in - press A for Drive A, the built-in disc drive.
  3. The next message that appears asks you to '...put the disc to FORMAT into the drive, thenpress Y'. Insert your second new disc and type Y.

    Formatting will now start. You will see the system counting through the numbers 0...39 asit prepares the new disc.

  4. When formatting is complete, you will see the message Format completed. Release the new disc from the drive and press Spectrum +3 CP/M Plus manual (9).You have noew formatted Side 1 of your Data disc.
  5. You are next asked whether you want to format another disc. The second side of the new disccounts as another disc, so re-insert your Data disc - this time with Side 2uppermost - and then press Y.

    Side 2 of the disc is then formatted as before.

  6. This time when copying has been completed, remove your new disc from the drive and put it to one side; you have now made yourself a Data disc. Then press Spectrum +3 CP/M Plus manual (10) twice to return toDISCKIT's main menu.
  7. Finally press M to leave DISCKIT.
IMPORTANT: Store your CP/M Master disc safely somewhere where it will beaway from any magnets - including the ones in your television and your audio equipment - and where it won't get very hot, very cold, damp or dirty.

Conventions

Throughout this user guide, various conventions are used to represent different types of information. The principal conventions are as follows:

INPUT, PRINT, etc.
The names of commands and programs are shown in capital letters throughout this userguide. It does not matter whether you type these names as capitals or as lower case letters.
text in this style
This style of text is used to indicate something to type or something displayed on the screen, in order to distinguish it from descriptive text. This text should be typed exactlyas shown. In particular, you must be careful to use the correct type of brackets. If square brackets [ and ] are shown, you cannot use round brackets ( and) instead. However, letters shown here as capitals can be typed in either upper orlower case.
descriptions-in-italic
Italic text is used for descriptions of the type of information that is required, rather than the information itself. For example, number could be 1 or 2 or 3 etc. If the description of a single item is more than one word long, the words are joined by hyphens: forexample, line-number.

The majority of descriptions are explained in the accompanying text. The remainder are self-explanatory.

[items in slanted brackets]
Slanting brackets round an item is used to show that this item is optional. Normally, including the item and omitting the item produce different effects. The brackets themselvesshould always be omitted.
Spectrum +3 CP/M Plus manual (11), etc.
These graphics are used to represent 'named' keys on the keyboard. For example, Spectrum +3 CP/M Plus manual (12) represents the Enter key - not the letters E N T E R. Letter and digit keys are represented by the character itself. Forexample, Q represents the Q letter key.
Control-character
This represents a 'Control code'. The key to press will often be one of the special 'function'keys (listed in Appendix II.2) but holding downSpectrum +3 CP/M Plus manual (13) and then typing character will always work as well.

Part I: CP/M Plus

1Introduction to CP/M Plus1
1.1Getting started 3
1.2CP/M and the keyboard 4
1.3CP/M and the screen 5
1.4More about CP/M 9
1.5Some practice in using CP/M13
2CP/M Programs25
2.1Suitable software 25
2.2First steps 26
2.3Running ready installed software26
2.4Installing the software 29
2.5Spectrum +3 parameters 29
3Standard 'housekeeping' tasks33
3.1 Assessing the available space 34
3.2 Copying discs 34
3.3 Copying files 36
3.4 Creating files 38
3.5 Editing the command line 40
3.6 Editing text files 41
3.7 Erasing files 43
3.8 Finding the size of a file 44
3.9 Formatting discs 45
3.10Listing the directory 46
3.11Listing a file 47
3.12Organising your discs 48
3.13Protecting your files 49
3.14Renaming files 52
3.15Shortening the command line 53
3.16Switching which disc is read or written56
4Tailoring the Spectrum to your needs57
4.1 Setting up the parallel Printer port 58
4.2 Setting up the RS232 port for a serial printer66
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
5The CP/M built-in commands and utilities85
Alphabetical listing of the commands and utilities, with full descriptions and examples of their use.

Part II: Mallard BASIC

1Starting with BASIC129
1.1Entering BASIC 129
1.2Leaving BASIC 129
1.3Using BASIC 130
1.4Giving BASIC commands130
1.5Types of information 131
1.6Chapter review 135
2Starting programming with BASIC137
2.1A first program 137
2.2More complex programs139
2.3Changing a program 140
2.4Chapter review 142
3Real programming143
3.1Designing programs 143
3.2Getting information 144
3.3How information is stored 148
3.4Outputting the results 155
3.5Controlling the output device157
4Writing larger programs165
4.1Compartmentalising a program 165
4.2Sequences and loops 166
4.3Making decisions 168
4.4Stopping the program 172
4.5Organising the program 172
5Manipulating information179
5.1Manipulating numeric information179
5.2Manipulating textual information182
5.3Converting between different types of information185
6Using discs for information storage187
6.1General disc commands 188
6.2Sequential access files180
6.3Random access files 200
7Keyed access files for data bases213
7.1Writing a program using Keyed files 215
7.2Working out the main program 216
7.3Preparatory stage 217
7.4Adding a record 219
7.5Reading a record 223
7.6Deleting an entry 225
7.7Closing the Keyed file 227
7.8Enhancements 229
8Machine level operations239
8.1General information 239
8.2Applying a Patch 240
8.3Loading a machine code program241
8.4Using a machine code program 243
8.5Examples 244

Appendices

I Disc contents247
II CP/M Plus character set249
II.1The complete character set250
II.2The standard CP/M keyboard257
IIITerminal characteristics259
IV BASIC keywords265
V Reference books267
VI Technical description269
VI.1Character devices 270
VI.2Disc driver 275
VI.3Memory organisation 278
VI.4The BIOS 280
VI.5Field installable device drivers317
VII Error messages343
VII.1Disc handling errors 343
VII.2Device errors 344
VII.3CP/M Plus error messages 344
IndexChapter 1
Spectrum +3 CP/M Plus manual (2024)
Top Articles
Latest Posts
Recommended Articles
Article information

Author: Kelle Weber

Last Updated:

Views: 5331

Rating: 4.2 / 5 (53 voted)

Reviews: 84% of readers found this page helpful

Author information

Name: Kelle Weber

Birthday: 2000-08-05

Address: 6796 Juan Square, Markfort, MN 58988

Phone: +8215934114615

Job: Hospitality Director

Hobby: tabletop games, Foreign language learning, Leather crafting, Horseback riding, Swimming, Knapping, Handball

Introduction: My name is Kelle Weber, I am a magnificent, enchanting, fair, joyous, light, determined, joyous person who loves writing and wants to share my knowledge and understanding with you.