Previous chapter | Index | Next chapter |
The advantage of running CP/M Plus on the Spectrum +3 is that you can then run a number of programs - both programs bought 'off the shelf' from your computer dealer and 'Public Domain' programs available, for example, on computer enthusiasts' Bulletin Boards. These programs might be computer games, word processors, accountants' spreadsheets or project planners.
Unfortunately, although CP/M software will run on the Spectrum +3, it won't always produce the results you expect. It may not control the screen or the printer properly, or it may not respond correctly to the keyboard. If it is to work correctly, it will usually have to be 'installed' on the Spectrum +3.
This chapter provides a guide to avoiding the pitfalls and generally getting the best out of CP/M programs you buy. It will be useful to have this chapter handy when you buy software from an independent software dealer so that the dealer can check whether the software will work properly on the Spectrum +3.
Software for the Spectrum +3 must be:
It is also advisable to choose, if possible, software that has been installed to run on the Spectrum +3.
Your dealer will be able to tell you whether a suitable version of the software you want to use does exist. If the software is available in the right format but has not been installed on the Spectrum +3, you (or your dealer) will need to modify the program so that it will work correctly on your machine. This is a straightforward task but it may require detailed background knowledge.
If the program was written specifically for another computer, it may not be possible to modify it without specialised help. Check with your dealer that this is not the case! The process of modifying the program is called installing and it is covered in Section 2.4 of this chapter.
Whether your software is ready to run on the Spectrum +3 or whether it has to be installed first, it is wise to start by making a copy of the software discs you have just bought. That way you can keep the originals as the Master Copy, safely stored away in case of accidents.
A good move before you get involved in copying is to open the Write Protect Holes on your system disc and the discs you intend to copy so that you cannot spoil them by accidentally writing to them. So do this before you go any further. 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.
If the programs are supplied specifically for use with CP/M on the Spectrum +3, you can use DISCKIT to copy the whole disc.
If the programs are supplied set up for some other computer, for example the Amstrad CPC6128, you will need to format as many new blank discs as you require using DISCKIT (see Section 3.9) and then copy the files on the Master disc to your new discs. This file transfer can be done by using the PIP utility (as described in Section 3.3).
You are now ready to go on to either run the software or to install it.
The next step is to organise your working discs to make the software easy to run. There are essentially two approaches to running an applications program. You can:
Either: Load the CP/M operating system from your CP/M Start-up disc. Then replace this disc with the one holding the copy of the software and type the command(s) you need to run your applications program
Or (if possible): Create a special Start-up disc that holds the following:
We describe how to set up such a disc below.
The other things to pay attention to are:
You can either plan to store this on the same disc as the program (if there is enough room) or use a special disc just for data. If you take the second option, either use a disc that has already been formatted or format a new blank disc.
The standard screen size for CP/M on the Spectrum +3 is 24 x 51 but many CP/M programs will have originally been designed to run on computers that have an 24 x 80 screen as standard. When you run one of these programs, you will want to use your Spectrum's 24 x 80 option as well so that any output from the program is displayed properly on the screen.
The command that changes over to the 24 x 80 size of screen is:
SET24X80
When you want to return to using the standard 24 x 51 screen, type the command:
SET24X80 OFF
You can now run the software by loading CP/M and then running your program, following the instructions in the program's own instruction manual / user guide. The final piece of advice is to keep duplicate copies of all your important data files: the quick and simple way of doing this is to copy the whole disc, using DISCKIT.
Note: You can only create a Start-up disc for your application if it is possible to fit the file containing the CP/M operating system on the same disc as your application program and all the support files it needs.
If your application program is supplied specifically for use with CP/M on the Spectrum +3, the way to create such a disc for yourself is to use the DISCKIT utility to make a copy of this disc on a fresh disc (see Section 3.2) and then use PIP with the [O] option to copy from your CP/M Start-up disc the file containing the CP/M operating system, the current PROFILE.SUB file and any CP/M utilities you want to this disc - see Section 3.3.
(Using the [O] option is not essential but it is advised, whenever you want to copy program files. See the description of the PIP utility in Chapter 5 for details.)
If the program is supplied for use with CP/M on some other computer (for example, a CPC6128), you need to use DISCKIT to format a fresh disc (see Section 3.9) and then use PIP to copy the files you require both from your CP/M Start-up disc and from your application master disc (see Section 3.3). Again, we suggest using PIP with the [O] option when copying these files (see the description of the PIP command in Chapter 5 for details).
Either of these routes gives you a disc holding all the programs and data files you need. All that remains to do is to set up the PROFILE.SUB file so that immediately after loading, CP/M automatically loads and runs your application program.
The precise details will depend on the software you want to run in this way, but essentially, what you have to do is edit PROFILE.SUB so that it ends with the command lines you would normally type to run the application.
Suppose, for example, that to run your program you normally type the commands:
SETKEYS KEYS.APP APPLIC B:DATAFILE
and when you have finished using the APPLIC program, you return the keyboard to normal with the commands:
SETKEYS RESET.KEY
(What these 'Keys' commands do is explained in Section 4.6.)
To make all this happen for you, you might edit the supplied PROFILE.SUB file (using RPED, say - see Section 3.6) and add these command lines to the end of this file, giving you the new PROFILE.SUB file:
SETDEF C:,* [ORDER=(SUB,COM),TEMPORARY=C:] PIP <C:=PIP.COM <C:=SET24X80.COM < SETKEYS KEYS.APP APPLIC B:DATAFILE SETKEYS RESET.KEYUsing a Start-up disc with such a PROFILE.SUB on it is sometimes known as Turnkey Operation because you just turn the computer on and the software runs. It is particularly useful if you want other people, who may not understand CP/M, to use the software you have bought. You can then just tell them to turn the Spectrum +3 on, put in the disc, press the Space bar and follow the instructions both on the screen and in the program's own instruction manual / user guide.
A number of programs are designed for use on computers with two disc drives. These programs can still be run on a Spectrum +3 with just one disc drive.
The reason you can do this is that the Spectrum +3 can pretend to CP/M that there are really two disc drives - called Drive A and Drive B. CP/M then alternates between addressing the disc drive as Drive A and addressing it as Drive B, according to the needs of the application program.
The moment the drive is changed from Drive A to Drive B, the message in the bottom right hand corner of the screen changes to Drive is B and you will get a message asking you to replace the disc currently in the drive by the disc 'for Drive B' - ie. the one that you would use in the second drive if you had such a drive. Similar messages appear when the drive is changed from Drive B to Drive A.
The messages that you get are the same as those you will have seen if you worked through the 'Practice in using CP/M' (Section 1.5) and so used PIP to copy BASIC.COM to your Data disc. There the disc to put in 'Drive A' was the CP/M Start-up disc and the one to put in 'Drive B' was your data disc, and the messages you saw were:
Please put the disc for A: into the drive and press any keywhenever CP/M needed your CP/M Start-up disc, and:
Please put the disc for B: into the drive and press any keywhenever it needed your Data disc. When you have inserted the right disc, you simply press a key - for example, the Space Bar.
This section advises you on how to go about installing software. If your software comes ready installed, this section should be ignored.
The first thing to find out is whether the application you would like to install on your Spectrum +3 was written specifically for another computer or for a range of computers. If it was written specifically for another computer, you will probably need specialised help.
If it was written for a range of computers, there will be a program (either with the software or as a special part of it) that is designed to help you install the application. The job of this installation program is to set details within the main program according to information you supply about how the Spectrum +3 works.
The relevant information about the Spectrum +3 is tabulated at the end of this chapter. However, the form in which the details will be requested varies from software package to software package, and so there is no guarantee that you will be able to use this information directly.
If you are lucky, how the installation program works will be explained in the documentation supplied with the software. Your best source of advice is your dealer who will know both the Spectrum +3 and the software you propose to install.
The installation program will typically request information from you through a sequence of questions on the screen.
Software suppliers typically include a fairly detailed set of instructions with any software package that needs installing, and we strongly advise you to read this.
The questions that appear on the screen mainly refer to the codes generated by keystrokes at the keyboard, the codes required by the screen to move the cursor around or display information, and the form in which data needs to be presented to the printer. Many of these codes have been standardised over the years: it is just the ones that can vary from machine to machine that need to be specified.
The installation program is likely to start by asking you what kind of monitor and what kind of printer you have. It may well do this by offering you a list of possibilities.
If Zenith Z19/Z29 is on its list of monitors, select this. The Spectrum's screen is sufficiently like these to allow most programs to run properly.
Other programs may require you to specify the parameters more precisely. You will need to draw the answers to specific questions one by one from the tables on the following pages.
One option you can take in matching the keyboard to the program is to use the SETKEYS utility to redefine the codes the keyboard produces. The way to do this is described in Section 4.6. This can be simpler than giving the installation program details of the codes produced at present.
The installation program of the software package sould only ever need to be run once. The program ensures that the special parameters are set to the right values throughout the software package. However, if you do use SETKEYS, this has to be run each time.
Hex Value | Decimal Value | Key Number | |
---|---|---|---|
Cursor up | #1F | 31 | 23+ |
Cursor down | #1E | 30 | 24+ |
Cursor left | #06 | 6 | 22+ |
Cursor right | #01 | 1 | 19+ |
Delete character under cursor | #07 | 7 | 21+ |
Delete last character | #7F | 127 | 20+ |
Escape (exit) | #1B | 27 | 35+ |
Return | #0D | 13 | 30 |
Space | #20 | 32 | 35 |
Tab | #09 | 9 | 18+ |
Further details of the keyboard control codes are given in Appendix II.
Hex Value | Decimal Value | |
---|---|---|
Sound bleeper (Bell) | #07 | 7 |
Move cursor back one space | #1B #44 | 27 68 |
Move cursor forward one space | #1B #43 | 27 67 |
Move cursor down one line | #1B #42 | 27 66 |
Move cursor up one line | #1B #41 | 27 65 |
Carriage return | #0D | 13 |
Line feed | #0A | 10 |
Delete character under the cursor | #1B #43 | 27 78 |
Backspace | #08 | 8 |
Clear the screen | #1B #45 | 27 69 |
Clear all the screen up to the cursor | #1B #64 | 27 100 |
Clear all the screen after the cursor | #1B #4A | 27 74 |
Clear the line to left of cursor | #1B #6F | 27 111 |
Clear the line to right of cursor | #1B #4B | 27 75 |
Move the cursor to top left corner of the screen | #1B #48 | 27 72 |
Move cursor to row r, columnc | #1B #59 r c | 27 89 r c |
(r and c are actual values plus #20 (hex), 32 (decimal)) | ||
Insert a line | #1B #4C | 27 76 |
Delete a line | #1B #4D | 27 77 |
Enter inverse video | #1B #70 | 27 112 |
Leave inverse video | #1B #71 | 27 113 |
Enter underline mode | #1B #72 | 27 114 |
Leave underline mode | #1B #75 | 27 117 |
Further details of the keyboard control codes are given in Appendix III.
Previous chapter | Index | Next chapter |