170 lines
4.3 KiB
Groff
170 lines
4.3 KiB
Groff
.TH CPM 1
|
|
.SH
|
|
\fBNAME\fR
|
|
cpm \- read and write CP/M\*R floppy disks
|
|
.SH
|
|
\fBSYNOPSIS\fR
|
|
.OP cpm
|
|
[ options ] [ filename ]
|
|
.SH
|
|
\fBDESCRIPTION\fR
|
|
.PP
|
|
.I Cpm
|
|
reads and writes files with an internal structure
|
|
like a CP/M file system. By default
|
|
.I cpm
|
|
assumes that the specified file has the parameters of a standard IBM format
|
|
single sided single density 8" CP/M floppy disk, i.e., 2002 records
|
|
containing 128 bytes each, of which 52 are reserved for system use and
|
|
16 (2 blocks) are used by the directory (maximum 64 directory entries).
|
|
These parameters may be changed by
|
|
specifying the appropriate flags (see below). Thus, various double
|
|
density formats may also be read and written, provided that the hardware
|
|
can handle the actual format.
|
|
.PP
|
|
The specified file may be a floppy disk drive (e.g., /dev/floppy on
|
|
an 11/780 or /dev/rrx?b if rx02 drives are available on your system),
|
|
or a standard UNIX file with the appropriate structure. Since
|
|
it may be inconvenient (and slow) to access the device directly, in
|
|
particular the console floppy on an 11/780, it is always a good idea to
|
|
copy the contents of the diskette into a standard file using
|
|
\fIdd\fP(1), e.g.,
|
|
.sp
|
|
.nf
|
|
dd if=/dev/floppy of=yourfile bs=128 count=2002
|
|
.fi
|
|
.PP
|
|
On most systems you have to be superuser to access the console
|
|
floppy and to be able to write to rx02's.
|
|
.PP
|
|
Flags:
|
|
.TP 20
|
|
.OP \-d
|
|
display directory on standard output
|
|
.TP
|
|
.OP \-B
|
|
the files specified with the \fBc\fR or \fBC\fR flag contain binary
|
|
code rather than plain text (default)
|
|
.TP
|
|
.OM \-c \fIname1 name2\fR
|
|
copy the CP/M file \fIname1\fR to the UNIX file \fIname2\f
|
|
.TP
|
|
.OM \-C \fIname1 name2\fR
|
|
copy the UNIX file \fIname1\fR to the CP/M file \fIname2\f
|
|
.TP
|
|
.OM \-p \fIname\fR
|
|
copy the specified CP/M file to standard output
|
|
.TP
|
|
.OP \-i
|
|
enter interactive mode (all the above flags are turned off)
|
|
.TP
|
|
.OP \-I
|
|
force initializtion of the specified CP/M file (e.g., delete all files)
|
|
.TP
|
|
.OM \-s \fIn\fR
|
|
skew factor (sector interleaving); default is 6
|
|
.TP
|
|
.OM \-b \fIn\fR
|
|
block size (in bytes); default is 1K bytes
|
|
.TP
|
|
.OM \-m \fIn\fR
|
|
max number of directory entries; default is 64
|
|
.TP
|
|
.OM \-l \fIn\fR
|
|
sector size (in bytes); default is 128
|
|
.TP
|
|
.OM \-r \fIn\fR
|
|
number of sectors per track; default is 26
|
|
.PP
|
|
If the
|
|
.I \-i
|
|
flag is specified, the filename argument must always be present.
|
|
If the specified file does not exist, a
|
|
new file will be initialized. The
|
|
.I \-C,
|
|
.I \-c
|
|
and
|
|
.I \-p
|
|
flags are mutually exclusive.
|
|
.PP
|
|
The following commands are available in interactive mode:
|
|
.TP 24
|
|
\fIccopyin unixfile cpmfile\fR
|
|
copy UNIX binary file to CP/M
|
|
.TP
|
|
\fIccopyout cpmfile unixfile\fR
|
|
copy CP/M binary file to UNIX
|
|
.TP
|
|
\fIcopyin unixfile cpmfile\fR
|
|
copy UNIX text file to CP/M
|
|
.TP
|
|
\fIcopyout cpmfile unixfile\fR
|
|
copy CP/M text file to UNIX
|
|
.TP
|
|
\fIdel\fR[ete] \fIfilename\fR
|
|
a synonym for \fIerase\fR
|
|
.TP
|
|
\fIdir\fR[ectory] or \fIls\fP
|
|
display directory
|
|
.TP
|
|
\fIera\fR[se] \fIfilename\fR
|
|
delete the given file
|
|
.TP
|
|
\fIhel\fR[p]
|
|
print a short description of each command
|
|
.TP
|
|
\fIlog\fR[out] or \fIexi\fR[t]
|
|
terminate, return to the shell
|
|
.TP
|
|
\fIren\fR[ame] \fIfile1 file2\fR
|
|
rename \fIfile1\fR to \fIfile2\fR
|
|
.TP
|
|
\fItyp\fR[e] \fIfilename\fR
|
|
print CP/M file to console
|
|
.PP
|
|
.sp
|
|
The commands may be abbreviated as indicated by brackets.
|
|
CP/M file names are automatically converted to upper case.
|
|
The copy commands refuse to overwrite any existing files.
|
|
.PP
|
|
If the CP/M floppy file becomes full during a file transfer from UNIX,
|
|
the file is closed and the command terminated.
|
|
The data already written to the CP/M file will be saved.
|
|
.PP
|
|
The
|
|
.I copyout
|
|
command assumes that CP/M text files
|
|
have cr+lf as line terminators and removes carriage returns.
|
|
.I Copyin
|
|
adds a carriage return in front of each line-feed, and adds
|
|
a ^Z to the end of the file. The binary copy commands provide
|
|
for ``raw'' file copying, thus making it possible to copy code files
|
|
to and from diskettes.
|
|
.PP
|
|
Interrupts are recognized in interactive mode, and will return you to
|
|
the command level.
|
|
.SH
|
|
\fBFILES\fR
|
|
/dev/floppy
|
|
.br
|
|
/dev/rrx?b
|
|
.br
|
|
/usr/new/lib/cpm.hlp
|
|
.SH
|
|
\fBSEE ALSO\fR
|
|
dd(1), rx(4v)
|
|
.SH
|
|
\fBBUGS\fR
|
|
CP/M user numbers are ignored, files written
|
|
to the CP/M floppy file will always have user number 0.
|
|
.PP
|
|
No testing has been done with double density floppies.
|
|
.PP
|
|
CP/M filename extensions containing more than 3 characters will quietly be
|
|
truncated.
|
|
.PP
|
|
Wildcards are not supported.
|
|
.SH
|
|
\fBAUTHOR\fR
|
|
Helge Skrivervik
|