CODINGDDI-1 Firmware: The Complete CPC 464 DISC Operating System ROM Specification

DDI-1 Firmware: Chapter 4.0 Utility Programs (1/2)
★ Ce texte vous est présenté dans sa version originale ★ 
 ★ This text is presented to you in its original version ★ 
 ★ Este texto se presenta en su versión original ★ 
 ★ Dieser Text wird in seiner Originalfassung präsentiert ★ 

Chapter 4 - Utility Programs

Supplied with the disc system are a number of utility programs. Some of these are supplied by Digital Research and are fully documented in SOFT159 - A Guide to CP/M. The others are specific to the CPC464 and are documented here.

The CPC464 specific utilities are:

  • AMSDOS.COM Return to AMSDOS and BASIC
  • CLOAD.COM Copy a file from cassette to disc.
  • CSAVE.COM Copy a file from disc to cassette.
  • CHKDISC.COM Compare two discs using two drives.
  • DISCCHK.COM Compare two discs using one drive.
  • COPYDISC.COM Copy one disc to another using two drives.
  • DISCCOPY.COM Copy one disc to another using one drive.
  • FILECOPY.COM Copyfiles.
  • FORMAT.COM Format a disc in drive A:.
  • SETUP.COM Change the data in the configuration sector.
  • BOOTGEN.COM Write the boot and configuration sectors to disc.
  • SYSGEN. COM Write the CCP and BDOS to the system tracks.
4.1 AMSDOS.COM

Introduction

AMSDOS has been written to allow the user to exit from the CP/M environment, back to BASIC, under the AMSDOS environment. The AMSDOS program, in effect, performs the opposite of |CPM, which is used to exit from AMSDOS to CP/M.

Using AMSDOS.COM

The program is invoked by typing:

AMSDOS

No command parameters are required, any parameters entered will be ignored.

The program searches all foreground ROMs for the command BASIC. When the ROM, containing BASIC, has been found, the screen will clear, and the BASIC sign-on message will be printed. The user is now in BASIC. The AMSDOS environment has been re-established, such that BASIC may use the disc system.

In the unlikely event that no foreground ROM containing BASIC can be found the program will display the message:

BASIC not found.

and perform a warm boot.

4.2 CLOAD.COM

Introduction

CLOAD is a CP/M transient program that reads a cassette file and writes it to a disc file.

CLOAD does not create the AMSDOS header record when writing files to disc. This may cause some compatibility problems when using AMSDOS to access a disc program file created by CLOAD.

Starting CLOAD

The CLOAD program is held in a file called CLOAD.COM and may be invoked with the command:

CLOAD < cassette file >, < discfile >

CLOAD takes two command parameters which are entered after the CLOAD command, preceded by at least one space character. The command parameters may be separated by spaces or commas.

The first parameter, < cassette file >, is the name of the cassette file to read, enclosed in double quotes ("). If < disc file > is not specified then the trailing quote may be omitted. If < cassette file > is not specified then CLOAD reads the first file encountered on the cassette.

If the first character of < cassette file > is ‘! ', then it is removed from the filename and has the effect of suppressing the messages generated by the cassette reading software.

If < cassette file > is more than 16 characters long then the following message is output and CLOAD is abandoned:-

Invalid cassette filename

The second parameter, < disc file >, is the name of the CP/M file to write. If the cassette filename is also a valid CP/M filename, then the user need not specify < disc file >, in which case the CP/M file is given the same name as the cassette file. The user cannot specify < disc file > without first specifying < cassette file >.

If < disc file > is not a valid CP/M filename or if is not specified and the cassette filename is not a valid CP/M filename then the following message is output and CLOAD is abandoned:-

Invalid CP/M filename Protected Files

If the cassette file that is to be read is protected then the following message is output and C L 0 A D is abandoned:-

Cannot read protected cassette files Naming Of Disc Files

Whilst CLOAD is transfering data from cassette to disc a temporary file is created with . $ $ $ as the type. On successful completion of the transfer, if the specified file already exists then it is renamed with . B A K as the type. The temporary file is then given the specified filename.

Other Messages

Program error: Cassette stream in use

This message is output if CLOAD fails to open the cassette file because the current stream is in use. This message should not normally be produced.

Program error: Cassette stream not in use

This message is output if CLOAD fails to close the cassette file because the current stream is not in use. This message should not normally be produced.

** Break **

This message is output if the [ESC] key is pressed whilst reading from the cassette.

Disc directory full

This message is output if the directory of the disc is full.

Failed to rename temporary file

This message is output if CLOAD fails to rename the temporary file it created to the specified disc filename. This message should not normally be produced.

Disc or directory full

This message is output if CLOAD fails to write a record to disc due to either the disc or the directory being full.

Failed to close CP/M file correctly

This message is output if an error is produced when CLOAD closes the CP/M file.

4.3 CSAVE.COM

Introduction

CSAVE is a CP/M transient program that reads a disc file and writes it to a cassette file.

CSAVE does not use the header record that AMSDOS creates when writing files to disc. This may cause some compatibility problems when using CSAVE to access a disc program file created by AMSDOS.

When CSAVE opens the cassette file it sets the file type to be an ASCII file version 1.

Starting CSAVE

The CSAVE program is held in a file called CSAVE.COM and may be invoked with the command:

CSAVE < disc file >, < cassette file >, < write speed >

CSAVE takes three command parameters which are entered after the CSAVE command, preceeded by at least one space character. The command parameters may be separated by spaces or commas. To specify a particular parameter all preceding parameters must also be specified.

< disc file > is the name of the CP/M file to read. The user must enter this parameter. The filename may not contain any wildcard characters (* or ?). If < disc file > is not a valid CP/M filename then the following message is output and CSAVE is abandoned:-

Invalid CP/M filename

< cassette file >, if present, specifies the name of the cassette file to write, enclosed in double quotes ("). If no more parameters are specified after < cassette file > then the trailing quote may be omitted. If -cassette file> is not present then CSAVE uses the CP/M filename.

If the first character of -cassette file> is ‘! ', then it is removed from the filename and has the effect of suppressing the messages generated by the cassette reading software.

If < cassette file> is more than 16 characters long then the following message is output and CSAVE is abandoned:-

Invalid cassette filename

< write speed >, if present, selects one of two speeds at which data is written to the cassette, zero specifies a nominal 1000 bits per second and one specifies a nominal 2000 bits per second. If no -write speed> is given then the slower speed, zero, is assumed.

Other Messages

Program error: Cassette stream in use

This message is output if CSAVE fails to open the cassette file because the current stream is in use. This message should not normally be produced.

Program error: Cassette stream not in use

This message is output if CSAVE fails to close the cassette file because the current stream is not in use. This message should not normally be produced.

Invalid speed setting

(you may only specify 0 or 1)

This message is output if the user specifies an illegal speed setting.

** Break **

This message is output if the [ESC] key is pressed whilst reading from the cassette.

CP/M file does not exist This message is output if the CP/M file to be read does not exist.

4.4 CHKDISC.COM

Introduction

CHKDISC is a CP/M transient program which checks that the disc in drive B is an exact copy of the disc in drive A. The program supports the three AMSTRAD CP/M disc formats.

CHKDISC is for use on two drive systems, for one drive systems use DISCCHK. CHKDISC requires a minimum TPA size of 39K.

Starting CHKDISC

The CHKDISC program is held in a file called CHKDISC.COM and may be invoked with the command CHKDISC whereupon it displays a sign on message and then outputs the following prompt:-

Please insert source disc into drive A
and destination disc into drive B
Then press any key

The source disc is the original disc and the destination disc is the supposed copy.

Disc Formats

After the user has inserted the discs into drives A and B CHKDISC establishes the format of the source disc. This format is compared with the format of the destination disc. If the two are not the same, or the destination disc has not been formatted, then CHKDISC displays the following error message and the program is abandoned:-

Source and destination discs have

different formats

Otherwise checking commences with the message:

Copy checking started

and finishes with the message:

Copy checking complete

Copy Checking

The two discs are compared starting at track zero. Each track from the source disc is then compared with the data on the destination disc. If the data is found not to match then the following error message is displayed:-

Failed to verify destination disc
correctly: track n sector m

where n and m are the track and sector numbers of the bad sector respectively.

Multiple Checking

When checking is complete the following prompt is issued:-

Do you want to check another disc (Y/N):

To check another disc the user should enter Y. To exit CHKDISC and return to CP/M the user should enter N, which results in the following prompt being issued:-

Please insert a CP/M system disc into drive A
then press any key:_

The user should insert a CP/M system disc into drive A and then press a key. CHKDISC then initiates a warm boot to return to CP/M.

Other Messages

You must insert the source disc into drive A

This message is output if there is no disc in drive A when the user has been prompted to insert one. After this message is output the user is again prompted to insert the source disc into drive A.

You must insert a CP/M system disc
into drive A

This message is output if there is no disc in drive A when the user has been prompted to insert a CP/M system disc. After this message is output the user is again prompted to insert a CP/M system disc into drive A.

You must insert the destination disc
into drive B

This message is output if there is no disc in drive B when the user has been prompted to insert one. After this message is output the user is again prompted to insert the destination disc into drive B.

WARNING: Failed to compare disc correctly

This message is output if CHKDISC is abandoned whilst copying.

The source disc has an unknown format

This message is output if CHKDISC does not recognise the format of the source disc. After this message is output CHKDISC is abandoned.

Reading track: n

Where n is the current track number. This message is output when CHKDISC is reading a track from the source disc.

Checking track: n

Where n is the current track number. This message is output when CHKDISC is comparing a track of the destination disc.

Failed to read source disc correctly:

track n sector m

Where n and m are the track and sector numbers of the bad sector respectively. This message is output if CHKDISC fails to read a sector from the source disc correctly. After this message is output CHKDISC is abandoned.

Failed to read destination disc correctly:
track n sector m

Where n and m are the track and sector numbers of the bad sector respectively. This message is output if CHKDISC fails to read a sector from the destination disc correctly. After this message is output CHKDISC is abandoned.

Failed to verify destination disc correctly:
track n sector m

Where n and m are the track and sector numbers of the bad sector respectively. This message is output if the data read back from the destination disc does not match that of the source disc.

↑C...aborted

This message is output if the user types Control-C when CHKDISC is waiting for user input. After this message is output CHKDISC is abandoned.

Illegal message number: Program aborted

This message indicates an error in the execution of the CHKDISC program. It should not normally be produced.

Insufficient space in TPA

This message is output if the size of the Transient Program Area is too small to contain the buffers used by CHKDISC. The user should warm boot CP/M with a 39K or greater CP/M system disc and invoke CHKDISC again.

4.5 DISCCHK.COM

Introduction

DISCCHK is a CP/M transient program which checks that one disc is an exact copy of another, using a single disc drive. The program supports the three AMSTRAD CP/M disc formats.

DISCCHK is for use on a one drive system, for two drive systems use CHKDISC.

DISCCHK checks eight tracks at a time and requires a minimum TPA size of 39K.

Starting DISCCHK

The DISCCHK program is held in a file called DISCCHK.COM and may be invoked with the command DISCCHK whereupon it displays a sign on message and then outputs the following prompt:-

Please insert source disc into drive A
then press any key

As checking begins and ends the following messages are displayed:

Copy checking started
Copy checking complete

Disc Formats

After the user has inserted the source disc into drive A DISCCHK establishes its format. This format is compared with the format of the destination disc. If the two are not the same, or the destination disc has not been formatted, then DISCCHK displays the following error message and the program is abandoned:-

Source and destination discs have
different formats

Copy Checking

The two discs are compared eight tracks at a time, starting at track zero. Each block of eight tracks is read from the source disc then compared with the data on the destination disc. If the data is found not to match then the following error message is displayed:-

Failed to verify destination disc correctly:
track n sector m

where n and m are the track and sector numbers of the bad sector respectively.

Changing Discs

DISCCHK uses only drive A for checking. Prior to reading the source disc the following prompt is displayed: -

Please insert source disc into drive A
then press any key:_

Prior to checking the destination disc the following prompt is displayed:-

Please insert destination disc into drive A
then press any key:_

The user must ensure that the correct disc is inserted into drive A.

Multiple Checking

When copy checking is complete the following prompt is issued:-

Do you want to check another disc (Y/N):_

To copy check another disc the user should enter Y. To exit DI S C C H K and return to CP/M the user should enter N, which results in the following prompt being issued:-

Please insert a CP/M system disc into drive A
then press any key:_

The user should insert a CP/M system disc into drive A and then press a key. DI S C C H K then initiates a warm boot to return to CP/M.

Other Messages

You must insert the source disc into drive A

This message is output if there is no disc in drive A when the user has been prompted to insert one. After this message is output the user is again prompted to insert the source disc into drive A.

You must insert a CP/M system disc into drive A

This message is output if there is no disc in drive A when the user has been prompted to insert a CP/M system disc. After this message is output the user is again prompted to insert a CP/M system disc into drive A.

You must insert the destination disc into drive A

This message is output if there is no disc in drive A when the user has been prompted to insert one. After this message is output the user is again prompted to insert the destination disc into drive A.

WARNING: Failed to compare disc correctly

This message is output if DISCCHK is abandoned whilst copying.

The source disc has an unknown format

This message is output ifDISCCHK does not recognise the format of the source disc. After this message is output DISCCHKis abandoned.

Source and destination discs have different formats

This message is output if the format of the source disc is different to that of the destination disc. After this message is output DISCCHKis abandoned.

Reading track: n

Where n is the current track number. This message is output when DISCCHK is reading a track from the source disc.

Checking track: n

Where n is the current track number. This message is output when DISCCHK is comparing a track of the destination disc.

Failed to read source disc correctly:
track n sector m

Where n and m are the track and sector numbers of the bad sector respectively. This message is output if DISCCHK fails to read a sector from the source disc correctly. After this message is output DISCCHK is abandoned.

Failed to read destination disc correctly:
track n sector m

Where n and m are the track and sector numbers of the bad sector respectively. This message is output if DISCCHK fails to read a sector from the destination disc correctly. After this message is output DISCCHKis abandoned.

Failed to verify destination disc correctly:
track n sector m

Where n and m are the track and sector numbers of the bad sector respectively. This message is output if the data read back from the destination disc does not match that of the source disc.

↑C. . .aborted

This message is output if the user types Control-C when DISCCHK is waiting for user input. After this message is output DISCCHK is abandoned.

Illegal message number: Program aborted

This message indicates an error in the execution of the DISCCHK program. It should not normally be produced.

Insufficient space in TPA

This message is output if the size of the Transient Program Area is too small to contain the buffers used by DISCCHK. The user should warm boot CP/M with a 39K or greater CP/M system disc and invoke DISCCHK again.

4.6 COPYDISC.COM

Introduction

COPYDISC is a CP/M transient program that copies the data from a disc in drive A onto a disc in drive B. The program supports the three AMSTRAD CP/M disc formats.

COPYDISC is for use on a two drive system. For a one drive system use DISCCOPY.

COPYDISC requires a minimum TPA size of 39K.

Starting COPYDISC

The COPYDISC program is held in a file called COPYDISC.COM and may be invoked with the command COPYDISC whereupon it displays a sign on message and then outputs the following prompt:-

Please insert source disc into drive A
and destination disc into drive B
then press any key

As copying begins and ends the following messages are displayed:

Copying started
Copying complete

Disc Formats

After the user has inserted the discs into drives A and B COPYDISC establishes the format of the source disc. This format is compared with the format of the destination disc. If the two are not the same, or the destination disc has not been formatted, then COPYDISC will format each track of the destination disc as it copies.

The source disc is copied starting at track zero. Each track written to the destination disc is verified by reading it back and comparing it with the original data.

Multiple Copies

When copying is complete the following prompt is issued:-

Do you want to copy another disc (Y/N):_

To copy another disc the user should enter Y. To exit COPYDISC and return to CP/M the user should enter N, which results in the following prompt being issued:-

Please insert a CP/M system disc into drive A
then press any key:_

The user should insert a CP/M system disc into drive A and then press a key. COPYDISC then initiates a warm boot to return to CP/M.

Error Messages

You must insert the source disc into drive A

This message is output if there is no disc in drive A when the user has been prompted to insert one. After this message is output the user is again prompted to insert the source disc into drive A.

You must insert a CP/M system disc
into drive A

This message is output if there is no disc in drive A when the user has been prompted to insert a CP/M system disc. After this message is output the user is again prompted to insert a CP/M system disc into drive A.

You must insert the destination disc
into drive B

This message is output if there is no disc in drive B when the user has been prompted to insert one. After this message is output the user is again prompted to insert the destination disc into drive B.

The destination disc in drive B
must be write-enabled

This message is output if the disc in drive B is write-protected. After this message is output the user is again prompted to insert the destination disc into drive B.

This message is output if the destination disc is unformatted or does not have the same format as the source disc.

WARNING: Failed to copy disc correctly
The destination disc should not be used until
it is successfully copied onto.

This message is output ifCOPYDISCis abandoned whilst copying.

The source disc has an unknown format

This message is output if COPYDISC does not recognise the format of the source disc. After this message is output COPYDISC is abandoned.

Reading track: n

Where n is the current track number. This message is output when COPYDISC is reading a track from the source disc.

Writing track: n

Where n is the current track number. This message is output when COPYDISC is writing and verifying a track of the destination disc.

Failed to read source disc correctly:
track n sector m

Where n and m are the track and sector numbers of the bad sector respectively. This message is output if COPYDISC fails to read a sector from the source disc correctly. After this message is output COPYDISC is abandoned.

Failed to write destination disc correctly:
track n sector m

Where n and m are the track and sector numbers of the bad sector respectively. This message is output if COPYDISC fails to write a sector to the destination disc correctly. After this message is output COPYDISC is abandoned.

Failed to read destination disc correctly:
track n sector m

Where n and m are the track and sector numbers of the bad sector respectively. This message is output if COPYDISC fails to read a sector from the destination disc correctly. After this message is output COPYDISC is abandoned.

Failed to verify destination disc correctly:
track n sector m

Where n and m are the track and sector numbers of the bad sector respectively. This message is output if the data read back from the destination disc does not match that of the source disc.

Failed to format destination disc correctly:
track n

Where n is the current track number. This message is output ifCOPYDISC fails to format a track of the destination disc correctly. After this message is output COPYDISCis abandoned.

↑C. . .aborted

This message is output if the user types Control-C when COPYDISC is waiting for user input. After this message is output COPYDISC is abandoned.

Illegal message number: Program aborted

This message indicates an error in the execution of the COPYDISC program. It should not normally be produced.

Insufficient space in TPA

This message is output if the size of the Transient Program Area is too small to contain the buffers used by COPYDISC. The user should warm boot CP/M with a 39K or greater CP/M system disc and invoke COPYDISC again.

★ AUTHOR: Paul OVERELL
★ NOTE: RÉF SOFT158A

Page précédente : DDI-1 Firmware: Chapter 3. AMSDOS (3/3)
Je participe au site:

» Vous avez remarqué une erreur dans ce texte ?
» Aidez-nous à améliorer cette page : en nous contactant via le forum ou par email.

CPCrulez[Content Management System] v8.732-desktop/c
Page créée en 649 millisecondes et consultée 789 fois

L'Amstrad CPC est une machine 8 bits à base d'un Z80 à 4MHz. Le premier de la gamme fut le CPC 464 en 1984, équipé d'un lecteur de cassettes intégré il se plaçait en concurrent  du Commodore C64 beaucoup plus compliqué à utiliser et plus cher. Ce fut un réel succès et sorti cette même années le CPC 664 équipé d'un lecteur de disquettes trois pouces intégré. Sa vie fut de courte durée puisqu'en 1985 il fut remplacé par le CPC 6128 qui était plus compact, plus soigné et surtout qui avait 128Ko de RAM au lieu de 64Ko.