Disc Directory; Changing Discs; Amsdos Filenames And Filetypes - AMSTRAD cpc 6128 User Instruction

Integrated computer/disc system
Hide thumbs Also See for cpc 6128:
Table of Contents

Advertisement

Disc directory
Every disc has two sections, the directory and the data area. The directory contains a
list of all the file names and a 'map' of whereabouts on the disc each file is to be found.
AMSDOS or
CP/M
can calculate the size of a particular file by inspecting its directory
entry. Calculation of the amount of space left on a disc is made by adding up all the
files in the directory and seeing how much remains unused.
Whenever a file is read, its directory entry is examined, giving the disc location.
When a new file is created, free space is allocated to it, and when a file is erased the
space is relinquished. The directory works in units of
lK
and can have up to 64
different entries. Large files will have one entry for every 16K although normally
this fact is hidden from the user.
Changing discs
Under AMSDOS (and
CP/M
Plus) a disc may be changed, or removed, whenever the
drive is not being accessed and neither the input nor output files are open on that
drive. Unlike
CP/M
2.2 there is no need to 'log in' a disc.
Changing a disc while it is still being written to, may corrupt the data on the disc. If a
disc is changed while there are still files open on it, then as soon as AMSDOS detects
this, all the open files on the drive will be abandoned and an error message produced.
Any data yet to be written will be lost and the latest directory entry will not be
written to disc. However, AMSDOS can only detect this change when it reads the
directory, which it does every 16K of the file (and whenever a file is opened or closed).
Thus, potentially 16K of data could be corrupted by changing a disc while there are
still files open on it.
AMSDOS filenames and filetypes
It is standard practice to name disc files in such a way that there is an indication of
which 'type' they are. This naming convention DOES NOT 'force' the computer to use
the file in any particular way, however some programs will only accept a file when it
has the correct type of name. AMSDOS will accept any type of name, but will search
in preference for certain file types ifnot otherwise specified. (See 'AMSDOS headers'
ahead.)
Chapter 5 Page 2
AMSDOS and CP/M

Advertisement

Table of Contents
loading

Table of Contents