DDI-1 User Manual
DDI-1 User Manual
INSTRUCTIONS manual.
This version has been scanned and OCRed from the original and as a result may
contain spelling mistakes and errors which were not part of the original
document.
Amstrad plc have given their permission for this document to be distributed on
the Unofficial Amstrad WWW Resource.
Its speed will allow you to load and save files in seconds which would take several
minutes using cassette. Furthermore, each disc allows you to store up to 180k Bytes of
program on a single disc surface (360k on both sides). In other words, all your utilities
on a disc, 10 or so games on a disc, all your standard letter files on a disc, the database
from your indexing system on a disc - and so on.
Moreover, you can access files at random - which means that you don't have to pass
laboriously through unwanted program files to get to the one that you want to use.
Disc operation comes into its own when you want to write any sort of program. When
developing any software, it's very reassuring to take a copy every now and again in
case you happen to attempt to run it, and then discover that you've left an 'ON BREAK
GOSUB' lurking to prevent you from ever escaping back to direct mode; and if you
can do this in 5 seconds rather than 5 minutes, you will obviously get a lot more done!
When developing assembler programs, the convenience of being able to assemble
from disc and then test within seconds rather than minutes will be a boon to both the
seasoned programmer, and the novice feeling his way through machine code for the
first time.
The inclusion of CP/M opens a vast wealth of programming experience to the user.
The 80 column mode ensures that programs will require minimal modification to run
on the CPC464 - and the number of books written on the subject of CP/M and its use
runs well into three figures.
In short, you have made exactly the right decision to upgrade to disc based operation.
It will help and speed up your understanding and appreciation of computing in a way
that is simply not comparable with cassette-only systems.
Furthermore, the 3 inch compact floppy disc format, in its tough plastic casing (with a
protective shutter covering the head area) prevents accidental damage and provides a
positive and rigid location in the drive mechanism.
Two operating systems are supplied:
AMSDOS is an extension of the cassette filing system in CPC464 BASIC, and allows
access to the BASIC interpreter.
CP/M 2.2 is the standard 'random access' Z80 disc operating system for over 5000
commercial programs - ranging from business and accounts software to second
languages and scientific and engineering analysis. Thanks to the thoughtful
implementation of CP/M on the CPC464, CP/M files may be freely mixed on the disc
with AMSDOS files, which are automatically labelled with the appropriate filetype.
Digital Research's famous Dr LOGO has emerged as the most universal educational
and teaching medium - combining the unique user-friendliness of 'turtle graphics' with
sophisticated processing power. Dr LOGO is acclaimed as the most comprehensive
implementation of LOGO available and is supplied free as part of your Amstrad DDI-1
package.
AMSOFT
A division of
AMSTRAD
CONSUMER ELECTRONICS PLC
© Copyright 1984 AMSOFT, AMSTRAD Consumer Electronics plc
Neither the whole or any part of the information contained herein, or the product described in this manual may be
adapted or reproduced in any material form except with the prior written approval of AMSTRAD Consumer Electro-
nics plc ('AMSTRAD’).
The product described in this manual and products for use with it are subject to continuous development and improve-
ment. All information of a technical nature and particulars of the product and its use (including the information and
particulars in this manual are given by AMSTRAD in good faith. However, it is acknowledged that there may be errors
or omissions in this manual. A list of details of any amendments or revisions to this manual can be obtained by sending
a stamped, self addressed envelope to AMSOFT Technical Enquiries. We ask that all users take care to submit their
reply paid user registration and guarantee cards.
AMSOFT welcome comments and suggestions relating to the product or this manual.
All correspondance should be addressed to:
AMSOFT
169 Kings Road
Brentwood
Essex CM14 4EF
All maintenance and service on the product must be carried out by AMSOFT authorised dealers. Neither AMSOFT nor
AMSTRAD can accept any liability whatsoever for any loss or damage caused by service or maintenance by unautho-
rised personnel. This guide is intended only to assist the reader in the use of the product, and therefore AMSOFT and
AMSTRAD shall not be liable for any loss or damage whatsoever arising from the use of any information or particulars
in, or any error or omission in, this guide or any incorrect use of the product.
Dr LOGO and CP/M are trade marks of Digital Research Inc.
Z80 is the trademark of Zilog Inc.
AMSDOS and CPC464 are trademarks of AMSTRAD.
First Published 1984
Compiled by Roland Perry and Ivor Spital with acknowledgements to Locomotive Software Ltd.
Published by AMSTRAD
Typeset by AMSOFT Computer Graphics
AMSTRAD is a registered trademark of AMSTRAD Consumer Electronics plc. Unauthorised use of the trademark or
word AMSTRAD is strictly forbidden.
Contents
Foundation Course
F1 Setting Up
F2 About Discs
F3 Loading Software/Games
F4 Introducing AMSDOS and CP/M
Chapter 1 Making Working Discs
Backup master disc
A working SYSTEM/UTILITY disc
A BASIC only disc
Turnkey AMSTRAD BASIC discs
Turnkey CP1M discs and packages
Configuring discs
Starting and autostarting a Turnkey CP/M package
Chapter 2 AMSDOS Primer
Disc directory
AMSDOS filenames and filetypes
Filename construction, headers and wild cards.
Examples of using AMSDOS commands in a program
Saving variables and performing a screen dump
Reference guide to AMSDOS commands
Copying files
Reference guide to AMSDOS error messages
Chapter 3 CP/M Primer
Operating with CP/M
CP/M system tracks
Configuration sector
Console control codes
Logging in a disc
Direct console commands
Transient commands
File and disc copying
System management
Disc generation
Foundations 1: Setting Up
Connecting the Mains Lead
The Amstrad disc drive operates from a 220-240V ~50Hz Mains Supply.
The Mains Lead is fitted at the rear of the unit. Fit a proper Mains Plug to the Mains
Lead. If a 13 Amp (BS1363) Plug is used, a 3 Amp fuse must be fitted. The 13 Amp
Fuse supplied in a new Plug must NOT be used. If any other type of Plug is used, a 5
Amp Fuse must be fitted either in the Plug or Adaptor or at the Distribution Board.
IMPORTANT
The wires in this Mains Lead are coloured in accordance with the following code:
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 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.
Disconnect the Mains Plug from the Supply Socket when not in use.
Never attempt to remove any screws, or open the case of the disc drive. Always obey
the warning on the Rating Label which is located underneath the case of the disc drive:
WARNING LIVE PARTS INSIDE. DO NOT REMOVE ANY SCREWS
The POWER ON/OFF switch for the disc drive(s) is located on the rear panel of the
unit.
Always ensure that any discs are removed from the drive(s) before switching the
POWER switch ON or OFF.
Always switch the disc drives' POWER switch ON before switching the computer's
POWER switch ON.
Foundation 1.1 AMSTRAD Disc Drive & Interface DDI-1 Manual
Connecting the DDI-1 to the Computer
1. Check that the computer and disc drive(s) are switched off.
2. Plug the Interface Unit firmly into the edge-connector marked FLOPPY DISC at
the rear of the computer (See Figure 1)
Rear of Computer
Interface Unit
Figure 1
3. At the end of the ribbon cable from the Interface Unit, you will find a plug which is
to be used for connecting to the main disc drive (Drive A), see Figure 2.
The plug which you will find slightly further back in the cable (see Figure 2) is to
be used only for connecting to a second disc drive (Drive B); i.e. if you have
purchased an additional Amstrad FD-1.
Ribbon
Connector Plug to Cable
Main Disc Drive
(Drive A)
Interface
Unit
Connector Plug to
Second Disc Drive
Figure 2
(Drive B)
Computer
Interface
Unit
Figure 3
5. If you are operating with 2 disc drives, connect the computer and disc drives as
shown in Figure 4.
Computer
Interface
Unit
Main Disc Drive
(Drive A)
1) For maximum data reliability, do not position your disc drive(s) closer than 20cm
(8 inches) to the monitor, see Figure 5. It is recommended that you locate your disc
drive(s) to the right of the computer (or MP-1 modulator/power supply if used).
(RECOMMENDED
POSITION)
The Amstrad disc drive uses 3 inch compact floppy discs. We strongly recommend
that for reliable data-to-disc transfer, you use only Amsoft CF-2 compact floppy discs.
Discs made by leading manufacturers however, may also be used.
Each side of a disc may be used separately. A disc should be inserted with its label
facing outward from the drive, and with the side that you wish to use face up (See
Figure 6).
Figure 6
Write Protection
In the left hand corner of each side of a blank disc, you will see an arrow pointing to a
small shuttered hole. This is called the Write Protect hole, and facilitates protection
against erasure or 'overwriting'. See Figure 7.
Figure 7
Shutter Shutter
OPEN CLOSED
To close the Write protect hole, simply slide the shutter to it’s closed position, see
Figure 8(b).
Some other compact floppy discs employ a small plastic lever located in a slot at the
left hand corner, see Figure 9.
Lever
Write Protect
hole
(CLOSED) Figure 9
Slide Lever
towards middle of
disc
Write protect
hole
(OPEN)
Figure 10
Note that regardless of the method employed to open and close the Write Protect hole,
opening the hole in all cases facilitates protection against overwriting.
IMPORTANT
Always ensure that the Write Protect holes on your master CP/M disc are open
Eject
Indicator
Lamp Button
POWER ON indicator
Figure 11
Foundation 2.3 AMSTRAD Disc Drive & Interface DDI-1 Manual
Indicator Lamp
The red indicator lamp has two functions:
If only one disc drive is connected (Drive A), the lamp indicates that data is being read
from, or written to the disc.
If two disc drives are connected, the red indicator on Drive B will illuminate
constantly, giving you a quick indication of which unit is Drive B.
When reading or writing to disc takes place however, the indicator reverts to its
primary function of indicating that reading/writing is being performed.
Eject Button
Pressing in the Eject button allows you to remove your disc from the drive.
IMPORTANT
1. ALWAYS REMOVE YOUR DISC FROM THE DRIVE
BEFORE SWITCHING THE SYSTEM ON OR OFF.
2. DO NOT PRESS THE EJECT BUTTON WHILE THE DISC IS
BEING READ FROM OR WRITTEN TO. EJECTING THE
DISC AT THIS TIME WILL RESULT IN READ/WRITE
ERRORS.
3. THE MAGNETIC FLOPPY DISC IS PROTECTED BY ITS
PLASTIC OUTER CASING. NEVER ATTEMPT TO GAIN
ACCESS TO OR TOUCH, THE DISC ITSELF.
It is assumed from here onwards in this manual, that you are familiar with the CPC-
464 computer, and with its BASIC, and that you have carefully read and understood
the CPC-464's User Instruction book.
If you have inserted the software disc correctly the program will load in a few seconds,
and will be ready for you to use.
If not, study any error message on the screen to see where you went wrong:
Drive A: disc missing
Retry, Ignore or Cancel?
means that you have either not inserted your disc correctly, or that you have inserted it
into Drive B.
ROLCAVE. not found
means that you have either inserted the wrong disc, or have not carefully typed in the
exact name of the program.
(Always follow the loading instructions accompanying each software package).
Foundation 3.1 AMSTRAD Disc Drive & Interface DDI-1 Manual
Bad command
means that you have incorrectly named the program, either by exceeding the number
of permitted characters in a field, or by introducing an unwanted space or punctuation
mark.
Type mismatch
means that the computer has failed to read data from your disc. Check that you have
inserted the correct disc and press R to Retry. If the above message continues to
appear when you attempt to run that particular disc, it is likely that the disc has been
corrupted, or has not been correctly formatted using Amstrad CP/M.
Finally, if the message:
Press PLAY then any key:
appears on the screen, the disc drive(s) or the interface unit has not been correctly
connected to the computer, or the disc drive is not plugged into the Mains Supply and
switched on.
Note that if you wish to run a disc program after previously operating the Cassette
Datacorder, it will be necessary to issue the |disc command, described in the next
section.
The DDI-1 disc interface reduces the amount of memory available in the CPC464 by
1280 bytes. This may result in some cassette-based software failing to operate
correctly if run whilst the disc system is connected to the computer.
The 'Home Runner' demonstration on the CPC464 Welcome cassette is an example
of this aspect of operation.
If you encounter any such problems with cassette-based software, first eject any disc
present in the drive(s), then switch off the computer and disc drive(s).
Unplug the interface unit from the rear of the computer, and then switch on the
computer again. You will now be able to run the cassette in the normal manner.
will tell the computer to load the specified program from a disc placed in drive A.
If neither |a nor |b is initially entered or the computer is reset, the system will
default to drive A.
If you are using only one disc drive, this can be regarded as drive A, and |a or |b
commands need not be issued. Entering |b when only one disc drive is connected, will
result in the message on the screen:
Drive B: disc missing
Retry, Ignore or Cancel
Alternatively, you may for example wish to load in from cassette and save out to disc.
You may then use the command:
|tape.in
this command tells the computer to read data in from cassette, but continue to write
data out onto disc (default).
Similarly, to read data in from disc and save out onto cassette, you will first need to
type in: |disc.in to countermand the previously issued |tape.in (above), then: |
tape.out to tell the computer to write data out onto cassette.
It can be seen therefore that |tape.in and |tape.out countermand |disc.in
and |disc.out respectively, and vice versa.
Further information on directing data to and from discs and cassette will be found later
in this manual under the sections concerning AMSDOS and CP/M.
Outer Case
Sector
Track 0
Figure 12
There are 40 tracks from the outside of the disc (Track 0), to the inside (Track 39), and
the circumference of the disc is divided into 9 sectors.
Each track in a sector can store up to 512 bytes of data; hence the total available space
on each side of a disc is 180kbytes.
This command hands over control of the operating system from AMSDOS to CP/M,
(CP/M stands for Control Program for Microcomputers).
This is a 'Sign on' message indicating that the operating system is under the control of
CP/M.
The displayed A> on the screen is a prompt, (similar to Ready during normal BASIC
operation) indicating that the computer is awaiting your instructions.
CP/M uses several prompts, all of which will be explained later in this manual under
the section concerning CP/M.
Once you are operating CP/M, you cannot enter BASIC commands into the computer,
as these will not be understood.
If for example, you type in the BASIC command:
cls
The Computer will return your entry, together with a question mark:
CLS?
On the screen you will see a directory of CP/M and utility COMmands one of which is
format. Type in:
format
Remove the CP/M disc and insert your new blank disc, then press any black or blue
key. Formatting will start, commencing at Track 0 and ending at track 39, after which
you will be asked on the screen:
Do you want to format another disc (Y/N):
If you wish to format the other side of your blank disc, or format another disc, type Y
(for Yes) and you will receive the initial message once again.
The formatting process can be repeated any number of times until you answer the
repeat question N (for No), whereupon the system will ask you to:
After doing so, the computer will return you to direct mode CP/M (console mode), and
will await your next command. Other CP/M commands will be dealt with later in this
manual but for now, having learnt to format with CP/M, we will return to AMSDOS
by typing in:
amsdos
Always keep a master copy of your CP/M disc in a safe place, as it is literally the key
to your system. Later on in this manual, you will be shown how to make a 'working
copy' of your CP/M disc, so that you can keep your master copy safely locked away!
BEWARE
FORMATTING A PREVIOUSLY RECORDED DISC WILL ERASE ITS
CONTENTS.
You will not be able to format a disc which has its Write Protect hole open.
Attempting to do so will result in the message on the screen:
Drive A: disc is write protected
Retry, Ignore or Cancel?
Once again note that the naming of the program is obligatory, and that it should
contain no more than 8 characters in the first field, and up to 3 characters in the second
field. If you do not specify a second field, AMSDOS will place a token such as BAS
(short for BASIC) there.
Note also that filenames should not contain spaces or punctuation marks in the first or
second field. A dot . is used to separate fields.
Further information on the naming of disc files will be found later in this manual
Foundation 4.5 AMSTRAD Disc Drive & Interface DDI-1 Manual
under the sections concerning AMSDOS and CP/M.
As an example of saving to disc, write a short program into the memory, insert a
formatted disc, then type in:
save "example"
After a few seconds, the prompt Ready will appear on the screen, and the program
will have been saved onto disc. (If not, check any error message on the screen to
establish whether you either forgot to insert your disc into the correct drive, forgot to
close the write protect hole, mistyped the command or even forgot to plug in the disc
drive(s) and switch on!).
Binary, protected and ASCII text files may be saved onto disc using the normal ,b ,p
and ,a suffixes as with cassette saving.
Disc filenames do not require the use of a preceeding exclamation mark ! to suppress
reading/writing prompts and software messages on the screen. Any preceeding ! will
be removed from the filename and ignored by AMSDOS.
Catalog
Like cassettes, discs can be catalogued, but at much greater speed. After saving the
above program, type in:
cat
The filename will be displayed, including any specified or token second field. together
with the file length (to the nearest higher kbyte).
To copy the entire contents of one disc to another, it will be found much easier and
faster to use the DISCCOPY and COPYDISC facilities on the CP/M disc, than to
repeatedly load and save each program individually.
A brief description of how to use DISCCOPY and COPYDISC will be found later in
this section, and a more detailed account will be given under the section concerning
CP/M.
The DISCCOPY and COPYDISC facilities can be used to produce a 'working copy' of
the CP/M system disc itself.
After the program has loaded and the cassette has stopped, type in:
save "filename"
Note that protected programs and software/games will not be able to be copied onto
disc or cassette.
After the program has loaded and the Ready prompt appears, save the program onto
cassette by typing in:
|tape.out
save "program name" or save""
The computer will respond with:
Press REC and PLAY then any key:
After the cassette has stopped, the program from disc will have been saved onto
cassette.
Note that the command |tape directs both input and output data to tape (equivalent to
issuing |tape.in and |tape.out commands). Similarly |disc directs both input
and output data to disc.
Remove the CP/M system disc from the drive, and insert the disc that you wish to
copy. If you wish to copy the CP/M disc itself, simply leave the CP/M disc inserted in
the drive.
Whereupon you should remove your source disc and insert a disc for copying onto.
Bear in mind that any previous data on your destination disc will be overwritten during
copying.
If you insert a wrongly formatted or new unformatted disc into the drive, it will be
correctly formatted automatically during copying.
After you have inserted your destination disc and pressed a key, the computer will
display the message:
Writing track 0 to 7
and will then invite you to insert the source disc once again for reading tracks 8 to 15.
The reading/writing process will continue, 8 tracks at a time, until the last track (39) is
completed.
You will then be asked:
Do you want to copy another disc (Y/N):
If you have finished copying, answer N, then follow the instructions on the screen to
exit from the DISCCOPY mode.
Checking Discs
The CP/M system disc provides facilities for comparing one disc against another to
check for error free data copying.
If you have connected only one disc drive to the computer, select CP/M then type in:
discchk
Follow the instructions on the screen, and the destination disc will be checked against
the source disc. If the computer detects a difference between the discs, it will display
the message:
Failed to verify destination disc correctly:
track x sector y
Otherwise, the computer will continue to check through the discs, 8 tracks at a time,
until checking is completed. If an error was detected, a final WARNING: will be
displayed on the screen, before asking whether you wish to check another disc.
If you are operating 2 disc drives, disc checking may be carried out with more speed
and ease, using the CHKDISC facility. This operates in a similar manner to DISCCHK
previously described. The advantage of CHKDISC however, is that you do not have to
repeatedly insert and remove the source and destination discs. To use CHKDISC,
select CP/M then type in:
chkdisc
Aborting
Note that functions performed using the CP/M system disc can be aborted by holding
down [CTRL] and pressing the C key. Doing so will return you to CP/M console
mode.
As an example, select CP/M and type in:
disccopy
When the computer invites you to insert a disc, press [CTRL]C. The function will
then be aborted.
Further information on DISCCOPY, COPYDISC, DISCCHK and CHKDISC together
with FORMAT and other CP/M commands will be found later in this manual under the
section concerning CP/M.
AMSTRAD Disc Drive & Interface DDI-1 Manual Foundation 4.10
To conclude this 4-part Foundation course, here is a brief summary
of the Important points covered so far:
INSTALLATION
1. Always connect the Mains Lead to a 3 pin plug following the instructions
contained in the first section entitled, 'Setting Up'.
2. Never connect the disc drive(s) to any Mains Supply other than 220-240V ~ 50Hz.
3. There are no user serviceable parts inside the unit(s). Do not attempt to gain access
into the equipment. Refer all servicing to qualified service personnel.
4. Do not position your disc drives closer than 20cm (8 inches) to your monitor, nor
close to any source of electrical interference.
5. Keep disc drives and discs away from magnetic fields.
6. Keep the ribbon cable away from Mains Leads.
7. Do not block or cover any ventilation holes.
8. Do not use or store the equipment in excessively hot, cold, damp, or dusty areas.
OPERATION
1. Always remove any disc from the drive(s) before switching the system on or off.
2. Always switch the disc drives' POWER switch ON before switching the computer's
POWER switch ON.
3. Do not press the Eject button while reading or writing is being performed on a disc.
4. Ensure that you do not lose or accidentally overwrite your CP/M system disc. You
are advised to make a 'working copy' of the disc, and to ensure that its Write Protect
holes are open.
5. Never touch the floppy disc itself, inside its protective casing.
6. If you are using cassette based software while the DDI-1 system is connected to the
computer, observe the Memory Usage Warning on page F3.2 of this Foundation
Course.
This chapter discusses how to make discs to use from day to day,
and introduces some facilities of CP/M and its Utility programs.
The foundation course has described how to format a blank system disc, which you
can use for BASIC and games as well as CP/M, and how to make exact copies of discs
with the DISCCOPY (one drive) or COPYDISC (two drive) programs. This chapter
considers how to make discs with the programs that you want on them.
The FILECOPY program will inform you of the filenames as they are copied. You can
then run the new application program from your upgraded working disc.
The FILECOPY program will inform you of the filenames as they are copied.
When the FILECOPY program has finished you will have a working copy of the
turnkey disc. If you require any utilities, copy them from your System/Utilities disc
using FILECOPY.
1.5.2 Configuring a CP/M Program
The CPC464 supports a wide range of control codes suitable for customising a
software package to run with CP/M. Most data-processing any many other packages
require to be able to print messages at any part of the screen, accept input from any
part of the screen and generally understand cursor controls.
If your package has already been customised for the CPC464 then you need not
concern yourself further.
1.5.2.1 Configuring the Output from the package.
The installation procedure for a package will normally consist of running a special
program (often called INSTAL) which will ask a number of questions about the
parameters of the CPC464 screen. The answers should be derived from the table
below, which is an extract from the Amstrad BASIC reference Manual SOFT157:
Value Hex Value Decimal Operation
• Introduction to AMSDOS
• Disc Directory
• The format of file names
• AMSDOS file headers
• Wild cards
• An example program using AMSDOS Commands
• Reference Guide to AMSDOS Commands
• Manipulating files
• Reference guide to Error Messages
2.1 Introduction.
AMSDOS extends the AMSTRAD BASIC supplied with your CPC464 by the addition
of a number of external commands and by re-defining some of the existing BASIC
commands. The additional external commands are identified by the | (bar) symbol and
are automatically available from ROM when the DDI-1 disc interface is plugged onto
the CPC464.
NOTE that where a string expression is required by an external command it must be
passed a string variable address. See ERA as an example. Note also that it is not
permitted to include the | (bar) symbol in a REM statement.
AMSDOS allows the user to change discs freely, as long as no files are in use -in
which case an error message will be displayed and there could be a loss of data if the
open file was being written to.
and
|A
SAVE "B:PROG .BAS”
BERT.BAS BERT.BAS
FRED1.BAS FRED1.BAS FRED1.BAS FRED1.BAS
FRED2.BAS FRED2.BAS FRED2.BAS FRED2.BAS
FRED3.BAK FRED3.BAK
FRED3.BAS FRED3.BAS FRED3.BAS FRED3.BAS
FINISH.BAS FINISH.BAS FINISH.BAS
Cataloguing command:
CAT
The disc directory is sorted into alpha-numeric order and displayed in columns along
with each individual file size. The amount of free space is also shown.
2.5.2 Summary of AMSDOS external commands.
The following commands are contained in a ROM within the disc drive interface.
They are available as soon as the DDI- 1 is installed and powered up.
|A
|A
COMMAND: Display the disc directory (In CP/M style) and free space. If the <string
expression> is omitted, the wild-card is assumed.
|DISC
|DISC
COMMAND: Set the default drive. This will fail if AMSDOS is unable to read the
disc in the requested drive.
COMMAND: All files which match the filename and are not read-only are erased.
Wild cards are permitted.
|REN
|REN,<string expression>,<string expression>
O$="OLDNAME.BAS"
N$="NEWNAME.BAS"
|REN,@N$,@O$
COMMAND: Give a file a new name. A file with the new name must not already
exist.
|TAPE
|TAPE
When AMSDOS cannot carry out a command for some reason, it will display an error
message. If there is a problem with the hardware, an error message is followed by the
question Retry, Ignore or Cancel?
R causes the operation be be repeated, possibly after the user has taken some
preventive action.
I causes the computer to continue as if the problem had not occurred, which will often
lead to unexpected and possibly inconvenient results.
C causes the operation to be cancelled, which will often lead to a further error
message. For further information see Chapter 5.
Unknown command
The command is not spelt correctly, or the disc interface is either not installed
correctly or not powered up.
Bad command
The command cannot be carried out for some reason. Syntax error or hardware failure.
<FILENAME> already exists
User is trying to rename a file with a name already in use.
<FILENAME> not found
File does not exist.
Drive <DRIVE>: directory full
No more room in the disc directory for a new entry.
Drive DRIVE>: disc full
No more room on the disc for new data.
Drive <DRIVE>: disc changed, closing <FILENAME>
disc has been changed with files still open on it.
<FILENAME> is read only
File cannot be operated on because it is read only. Files can only be set read-only or
read-write in the CP/M environment.
CP/M is a disc operating system. It is a special program which gives you access to the
full power of your CPC464 disc system. Because CP/M is available for so many
different computers it means that there are thousands of applications packages
available for you to choose from and a whole wealth of knowledge and experience for
you to draw upon.
Full details of CP/M including information on how to write your own programs and
the information for the CPC464 implementation are contained in SOFT159 A Guide to
CP/M.
3.1 Introduction.
The CP/M operating system provides a user interface for disc hardware - a way for
you to communicate with the computer and manipulate files and peripherals.
The fundamental interface that is available is called the Direct Console Mode and is
identified by the A> or B> prompt. Certain built-in commands are available but the
majority of the functionality is obtained by loading and running 'Transient Programs'.
They are called 'transient' because they are only in the computer (rather than on the
disc) whilst you are using them, as opposed to being built-in.
As well as standard CP/M error messages the AMSTRAD disc system also generates a
number of specialised hardware error messages. Refer to section 2.7 of the AMSDOS
primer.
Note that PIP cannot be used to copy files from one disc to another on a single drive
system. Use FILECOPY instead.
3.7.2 File and disc copying
3.7.2.1 Single file copying
The utility FILECOPY allows you to copy files from one disc to another on a single
drive system. It copes with the disc changing and gives full instructions on the screen.
If a wild-card filename is specified then FILECOPY asks you to confirm that you
indeed wish to copy each file on an individual basis. The program informs you of each
filename as each file is copied.
FILECOPY *.BAS Copy all the files of type .BAS
FILECOPY EX1.BAS Copy the file EX1.BAS
Please Wait
This greeting will soon disappear and a question mark prompt ? will appear on your
screen.
The question mark tells you that Dr.Logo is waiting for you to type something at your
keyboard.
bf
(but first) Outputs all but the first element in the input object.
?bf "smiles
miles
?bf [l 2 3]
[2 3]
bl
(but last) Outputs all but the last element in the input object.
?bl "smiles
smile
?bl [l 2 3 4]
[l 2 3]
char
Outputs the character whose ASCII value is the input number.
?char 83
S
count
Outputs the number of elements in the input object.
?count "six
3
?count [0 1 2 3]
4
item
Outputs the specified element of the input object.
?item 4 "dwarf
r
list
Outputs a list made up of the input objects, retains lists' outer brackets (compare with s
e).
?(list 1 2 3 4)
[l 2 3 4]
?List "big [feet]
[big [feet]]
?(list)
[]
or
Outputs FALSE if all input expressions are FALSE.
?or "TRUE "FALSE
TRUE
?or (3=4)(1=1)
TRUE
=
Outputs TRUE if the two input objects are equal; otherwise outputs FALSE.
?= "LOGO "LOGO
TRUE
?1=2
FALSE
>
Outputs TRUE if the first input word is greater than the second; otherwise outputs
FALSE.
?> 19 20
FALSE
?20>19
TRUE
<
Outputs TRUE if the first word is less than the second; otherwise outputs FALSE.
?< 27 13
FALSE
?13<27
TRUE
4.10.5 PROCEDURES:
end
Indicates the end of a procedure definition; must stand alone at the beginning of the
last line.
?to square
>repeat 4[fd 50 rt 90]
>end
square defined
?square
po
(print out) Displays the definition(s) of the specified procedure(s) or variable(s).
?po "square
to square
repeat 4[fd 50 rt 90]
end
?po "X
x is 3
pots
(print out titles) Displays the names and titles of all procedures in the workspace.
?pots
4.10.6 EDITING:
ed
(edit) Loads the specified procedure(s) and/or variable(s) into the screen editor's
buffer.
?ed "square
Some knowledge of the fundamentals of CP/M is also assumed. This chapter does not
however attempt to discuss the facilities available in the CP/M environment. Complete
information concerning CP/M, the CPC464 CP/M environment and the technical
specification of the BIOS is contained in SOFT159 A Guide to CP/M. The Complete
Firmware Specification of the Amstrad DDI-1 is contained in SOFT 158A, available
as an Appendix to the Concise Firmware Specification SOFT158.
5.0 Introduction
AMSDOS is a disc operating system for the AMSTRAD CPC464 fitted with the DDI-
1 floppy disc interface. AMSDOS enables BASIC programs to access disc files in a
similar manner to cassette files, indeed existing programs which currently use the
cassette should be able to use disc files with little, or no, modification. The main
source of incompatability will be file names in that, for AMSDOS, files names must
conform to CP/M standards whereas cassette file names are far less restricted.
AMSDOS has been designed to complement CP/M, not to compete with it. They share
the same file structure and can read and write each other's files. AMSDOS resides in
the same ROM as the CP/M BIOS.
AMSDOS switches the cassette input and output streams (#9) to and from disc. Thus
all the facilities available on cassette become available on disc. In addition displaying
the disc directory, erasing disc files, renaming disc files, and selecting the default
drive and user are also facilitated.
These facilities are implemented either by intercepting the cassette firmware calls or
by external commands.
5.1 Headers
Cassette files are subdivided into 2k blocks, each of which is preceded by a header.
CP/M files do not have headers. AMSDOS files may, or may not, have a header
depending on the contents of the file. This will not cause problems for programs
written in BASIC but is an important difference between cassette and disc files. This
could perhaps be exploited for a protection scheme.
Bad command
The command has failed in some way. There is a syntax error in a command or
filename, or a BIOS error has been exited with a C cancel option.
Reading Files
125 #BC77 CAS IN OPEN Open a file for input
126 #BC7A CAS IN CLOSE Close the input file properly
127 #BC7D CAS IN ABANDON Close the input file immediately.
128 #BC80 CAS IN CHAR Read a character from the input file.
129 #BC83 CAS IN DIRECT Read the input file into store.
130 #BC86 CAS RETURN Put the last character read back.
#BC89 CAS TEST EOF Have we reached the end of the
131 input file yet?
Writing Files
132 #BC8C CAS OUT OPEN Open a file for output.
133 #BC8F CAS OUT CLOSE Close the output file properly.
134 #BC92 CAS OUT ABANDON Close the output file immediately
135 #BC95 CAS OUT CHAR Write a character to the output file.
#BC98 CAS OUT DIRECT Write the output file directly from
136 disc.
Cataloguing
137 #BC9B CAS CATALOG Generate a catalogue from disc
EACH DISKETTE IS SERIALISED, AND YOU MAY NOT USE, COPY, MODIFY,
TRANSFER, OR OTHERWISE MAKE AVAILABLE TO ANY THIRD PARTY, THE
PROGRAM, OR ANY COPY, MODIFICATION OR MERGED PORTION, IN WHOLE
OR IN PART, EXCEPT AS EXPRESSLY PROVIDED FOR IN THIS LICENCE
AGREEMENT.
IF YOU TRANSFER POSSESSION OF ANY COPY, MODIFICATION OR MERGED
PORTION OF THE PROGRAM TO ANOTHER PARTY, YOUR LICENCE IS
AUTOMATICALLY TERMINATED.
3. TERM
The licence is effective until terminated. You may terminate it at any other time by
destroying the program together with all copies, modifications and merged portions in
any form. It will also terminate upon conditions set forth elsewhere in this Agreement
or if you fail to comply with any term or condition of this Agreement. You agree upon
such termination to destroy the program together with all copies, modifications and
merged portions in any form.
4. LIMITED WARRANTY
THE PROGRAM IS PROVIDED "AS IS". NEITHER DRI NOR AMSTRAD MAKE
ANY WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED,
INCLUDING, BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE
ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU (AND DRI
OR AMSTRAD) ASSUME THE ENTIRE COST OF ALL NECESSARY SERVICING,
REPAIR OR CORRECTION.
Neither DRI nor AMSTRAD warrant that the functions contained in the program will
meet your requirements or that the operation of the program will be uninterrupted or
error free.
However, AMSTRAD warrants the diskette on which the program is furnished, to be
free from defects in materials and workmanship under normal use for a period of
ninety (90) days from the date of delivery to you as evidenced by a copy of your
receipt.
6. REGISTRATION CARD
DRI may from time to time update its programs. Updates will be provided to you only
if a properly signed registration card is on file at DRI's main office or an authorised
registration card recipient. DRI is not obligated to make any program updates, or to
supply any such updates to you.
7. GENERAL
You may not sublicence, assign or transfer the licence or the program except as
expressly provided in this Agreement. Any attempt otherwise to sublicence, assign or
transfer any of the rights, duties or obligations hereunder is void.
This agreement shall be governed by and construed in accordance with the laws of
England.
Should you have any Questions concerning this Agreement. you may contact DRI by
writing to Digital Research Inc., P.O. Box 579, Pacific Grove, California 93950.