home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Oakland CPM Archive
/
oakcpm.iso
/
cpm
/
dskutl
/
read-pc.lbr
/
READ-PC.DZC
/
READ-PC.DOC
Wrap
Text File
|
1987-07-06
|
11KB
|
199 lines
Documentation
for
READ-PC
Version 1.0 -- 23 February 1986
Author: TS Kelso
SYSOP - Celestial RCP/M
8000 B West Gate Blvd
Austin, TX 78745-6815
RCP/M: (512) 892-4180 300/1200 Baud, 24 Hours
READ-PC is a Turbo Pascal program which permits CP/M systems to transfer files
from IBM PC-DOS/MS-DOS diskettes to CP/M diskettes.
Public Domain Notice
--------------------
The source code for READ-PC is placed in the public domain for unrestricted
private use with the sole requirement that the notice stating its origin
remain in the code. The code may be modified, as needed, to support user
requirements, however, only the unmodified source code may be distributed in
the public domain. The use of this code for commercial purposes without
express written permission from the author is strictly prohibited.
Requirements
------------
READ-PC is a bare bones package which should run on any standard CP/M system
that meets the following requirements:
(1) Minimum of one 5 1/4" double-density soft-sector disk drive and one
other disk drive of any type. It is preferable that the 5 1/4" drive
be double-sided, otherwise, it will be incapable of handling double-
sided PC-DOS/MS-DOS diskettes.
(2) Standard CP/M or compatible operating system. READ-PC accesses the IBM
configured drive through the use of standard CP/M BDOS and BIOS calls.
If your system does not support the standard implementation described
in Digital Research's documentation, this program will not work.
(3) The ability to configure the 5 1/4" drive to read a format which is
compatible with that used for PC-DOS/MS-DOS diskettes. Per the MS-DOS
Technical Information, this requires the drive to be able to read 40-
track (48 tpi), soft-sectored, double-density diskettes with nine 512-
byte sectors per track. Again, it should be capable of supporting
double-sided diskettes if you want to read them.
Motivation
----------
READ-PC was developed to provide a means for transferring PC-DOS/MS-DOS files
from 5 1/4" diskettes to CP/M files to satisfy a personal need. The author
owns a 8086/8087 MS-DOS system which uses only 8" drives. As a result, he had
no way to transfer files to that system from 5 1/4" PC-DOS/MS-DOS diskettes
except via modem (since no currently available software was available to fill
this need).
Unfortunately, this is inconvenient for large data files and usually
impossible for proprietary software purchases. Fortunately, however, he also
owns a Heathkit H-89 (which runs the Celestial RCP/M) that, with its Magnolia
disk controller, provides a method (when combined with the appropriate
software, i.e., READ-PC) of satisfying this need through a transfer to CP/M
files. While you may not have identical needs, this program will permit you
to transfer ASCII text or other data files from IBM PC compatible diskettes
for use on your CP/M system.
Operating READ-PC
-----------------
To run READ-PC, you must first compile the source code using Turbo Pascal.
The only system dependent features requiring possible modification are those
pertaining to the arrangement of drives on your system. You must set LDrive
(almost always the A: drive), HDrive (the highest drive in your system), and
then the source (PC-DOS/MS-DOS), and target (CP/M) drives. Current settings
are:
LDrive = 'A' HDrive = 'D'
source = 'D' target = 'C'
To compile, use the Option command, select Compile, and set Start = 2500. The
start address MUST be 2500H or greater to work! Then Quit and Compile. The
resulting file READ-PC.COM is now ready to go.
You may place READ-PC.COM on any CP/M diskette in your system, but if you put
it on the target drive, be sure that you will still have enough room to
receive all the files from the source drive. Before executing READ-PC, be
sure that you have configured the source drive, if necessary. If you forget,
you will be reminded when you run READ-PC.
There may be many ways of configuring the source drive to be 'IBM compatible'.
Your system may already use a compatible disk format. On the Heathkit H-89
with Magnolia disk controller there is a program named MODE which allows
several different formats to be read. As it turns out, the MMS format is IBM
compatible. Users of the TRS-80 Model 4 with Montezuma Micro's CP/M have a
transfer utility which supports numerous CP/M formats. They can even specify
a user defined format. Owners of UNIFORM also have this ability. All these
users need to do is specify the source drive as an IBM compatible format.
Now, place the source diskette in the source drive and a pre-formatted CP/M
diskette (with adequate space) in the target drive and type 'READ-PC'. A
brief description of the program will be printed and then you will be asked if
you have configured the source drive. Respond 'Y' or 'N' (no carriage return
is necessary). If you respond 'Y', the program will show which drive you have
designated as source and which is the target. You may hit any key to begin
the file transfer.
The program begins by reading both copies of the File Allocation Table and
compares them for errors. If a miscompare occurs, an error message will be
displayed on line 24, followed by the number of miscompares. If this happens,
one of two problems has occurred: either the diskette does not conform to MS-
DOS standards or there is an actual error in either (or both) FATs. Since
this will almost certainly result in an unsuccessful transfer, the program
terminates under these circumstances.
The user may, however, modify the code to continue with the transfer. Simply
remove the 'goto exit' statement in the main program where the FAT compare is
performed. The transfer will continue to attempt the transfer. There is no
need to be concerned about damage to your system if the FAT is actually
corrupted, since the program does limit checking on track and sector numbers.
If a corrupted FAT entry specifies an out-of-limit value, an error message
will display on line 24 and execution will continue.
If this happens, you are advised to type ^S followed by a ^C to terminate
execution since an obvious FAT error exists. If you wish to attempt the
transfer using the second FAT instead of the first, simply change all
references to "FAT[1,...]" to "FAT[2,...]" in Function Next_Cluster and in the
main program where the Media Descriptor Byte is read (total of three
occurrences). Then the program will use the second FAT to attempt to perform
the transfer.
The program then reads the Media Descriptor Byte as specified in the MS-DOS
Technical Information. READ-PC uses this byte to determine whether the
diskette is single or double-sided. Currently, only two values are recognized
and they are assumed to be as specified in MS-DOS documentation. If the value
read is not one of these two values, the program will terminate. Should this
happen, one of two things has occurred: either the format uses eight 512-byte
sectors per track (which READ-PC is not programmed to handle) or there is an
error in the File Allocation Table (FAT). Under normal conditions, this
should not happen.
Once these hurdles have been cleared, the program begins reading the directory
and transferring the files, one at a time. As each file is located, its name,
the time and date of its creation, and its size in bytes are displayed. As
the transfer continues, each cluster number in the file is echoed, along with
the track and sector being accessed. Any error conditions along the way are
reported on line 24.
That's about it. When all files have been transferred, the program says so
and quits. You now have the files (with their original filenames) as files on
your CP/M target diskette. Enjoy!
Limitations
-----------
This is the first release of READ-PC (and depending upon user feedback, may
also be the last) and, as a result, there are still some limitations. Future
releases should be expected to incorporate one or more of the following
features:
(1) Prompting of the user for the source and target drives.
(2) Prompting as to whether to continue with file transfer after discovery
of a FAT miscompare. If yes, transfer will be attempted first using
FAT 1. On discovery of an out-of-limit error condition, transfer would
then continue with FAT 2 (going back to the beginning of the file in
which the error occurred).
(3) Depending upon user needs, other values of the Media Descriptor Byte
will be incorporated.
(4) Incorporation of code to directly modify the Disk Parameter Block in
CP/M to support the source drive. This would permit users not having
any other way of configuring the source drive to use READ-PC.
(5) The current version of READ-PC makes no attempt to transfer files
contained in sub-directories. Since the need for the use of sub-
directories on 5 1/4" diskettes is normally not necessary or can be
avoided, it is assumed that all files are in the root directory. If
this perception is incorrect, this feature will be corrected in a
future release.
There is currently no intention of adding a capability to write to PC-DOS/MS-
DOS diskettes. Many IBM compatible systems already have utilities which
permit transferring CP/M files to PC-DOS/MS-DOS systems and there is no
perceived demand for such a capability here.
What to do if you don't have Turbo Pascal
-----------------------------------------
If you do not have the Turbo Pascal compiler, you may leave a message on the
Celestial RCP/M stating your computer (terminal) type, the drive you wish to
use to read the PC-DOS/MS-DOS diskettes from, and the CP/M drive you wish to
have them transferred to. I will compile a copy for you and place it on the
system for you.
Further Information
-------------------
Requests for further information or questions on how to use, configure, or
expand READ-PC should be referred to the Celestial RCP/M at (512) 892-4180 or
sent by mail to the address at the beginning of this documentation file.
- TS Kelso