[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Apple// CP/M question



In article <3A1070CE.E6046A73@mts.net>,
Mike Pfaiffer  <pfaiffer@mts.net> wrote:
 
> The problem: My brother had some CP/M disks from his old Apple//e
> clone. He now wants some source code he developed which he has on one of
> the disks. He says he wants hard copy. 
> 
> Attempts at a solution: Since MSDOS was basically a rip of CP/M I tried
> printing it directly. No go.
 
Of course not - for two reasons:
 
1. Apple // used a low-level format on its diskettes which was
incompatible with virtually everything else, and this applies to
Apple CP/M disks too.  To read your Apple disks on a PC, you need a
hardware addon.  Such a hardware addon was sold in the very early
days of the PC, some 15+ years ago.
 
2. Even if Apple // disks had been compatible with the rest of the
world on the sector level, MSDOS still uses a different logical disk
format than CP/M.  There are PC utilities which are able to transfer
files from/to CP/M disks.  Some of them are able to handle hundreds
of different CP/M disk formats -- with one notable exception: the
Apple CP/M disk format is always absent from their lists of CP/M disk
formats, due to the low-level incomatibility mentioned in 1. above.
 
> His text editor is no longer functional.
 
Can he attach a printer to his CP/M machine?  If the source code is
in text file format, simply do:
 
    PIP PRN:=<filename.ext>
 
to print the file (this requires the file PIP.COM on the CP/M
diskette).  If the source code is in BASIC; chances are that it is
tokenized.  You must then first convert it to ASCII.  In MBASIC you
do the conversion like this (requires MBASIC.COM on the diskette,
and we assume the program is named MYPROG.BAS):
 
MBASIC
......................
LOAD "MYPROG"
SAVE "NEWPROG",A
SYSTEM
 
The "LOAD" command in MBASIC is able to handle BASIC programs both in
ASCII and in tokenized formats.  The SAVE command saves the program in
tokenized format unless told otherwise -- in this case the "A" switch
tells "SAVE" to save the program in ASCII format.  The SYSTEM command
leaves MBASIC and returns to CP/M.
 
> I tried moving it to DOS 3.3 or ProDOS where I could write a program in
> BASIC. All his copy programs are no longer functional. The copy programs
> from the local users group copy only disks and not files. He has no
> serial card or modem so transferring files that way is out. 
> 
>         Questions: Is there a way to print the files he wants from DOS or
> ProDOS? Is there a way to transfer the files to ProDOS? Can a PC running
> Linux or Windoze read a CP/M disk (I don't think it can)?
 
There was a Microsoft utility called CPMXFER, which ran on Apple DOS 3.3
and was able to transfer CP/M files to Apple DOS text or binary files.
A text file transfer transformed the text from CP/M format to Apple DOS
format (end-of-lines changed from CR+LF to just CR, and the hi bit was
set in each character), while a binary fiole transfer transferred the
file verbatim, just adding the usual 4-byte preffix containing "start
address" (usually irrelevant in this case) and "length".
 
I might be able to dig up a hex dump of CPMXFER so you can type it in
on your brother's Apple II, if nothing else works and if it's very
important to transfer these files.
 
-- 
----------------------------------------------------------------
Paul Schlyter,  Swedish Amateur Astronomer's Society (SAAF)
Grev Turegatan 40,  S-114 38 Stockholm,  SWEDEN
e-mail:  pausch at saaf dot se   or    paul.schlyter at ausys dot se
WWW:     http://hotel04.ausys.se/pausch    http://welcome.to/pausch