[net.micro.apple] PASCAL on the //e

digger@zps.UUCP (Scott A. Miles) (03/27/84)

	Does anyone know of a way to move pascal binary files to
	DOS 3.3 disks? It would be nice if you could write a program
	in the pascal environment and then move the executable to
	a standard disk for someone to use who knows very little about
	the computer.


				Thanks
				Scott Miles
				zehntel!zps!digger

ags@pucc-i (Seaman) (03/27/84)

A good source of information for Pascal <-> DOS 3.3 file transfers is the
book "Beneath Apple DOS" by Don Worth.  There is a companion book and disk
called "Bag of Tricks" from Quality Software.  The disk contains a program
which can do the transfers, but it is not extremely convenient to use, since
the file transfer is only a side effect of the program's main purpose, which
is to examine disks and display raw data, make patches, etc.

There have been file transfer programs in various magazines.  I don't have
a reference in front of me but I can dig one up if anyone needs it.  I have
never seen the need for Pascal <-> DOS file transfers myself, since I don't
use DOS for anything but the most trivial purposes, but I know what is
involved.  

Basically, you need to use the lowest-level disk routines (Pascal's
"unitread" and DOS "RWTS") to read the foreign disk.  The trickiest part, 
if you want to program it yourself, is figuring out how to map Pascal 
"blocks" into DOS "track/sector" addresses.  The two systems use a different 
interleaving scheme, which largely explains why Pascal disk operations are 
so much faster than DOS.  This is detailed in "Beneath Apple DOS," which 
also describes the Apple CP/M format (yet another interleaving scheme).

You also need to decipher the directories.  The DOS directory is located
on track 17 (11 HEX) and is well-documented in the Apple manual.  The
Pascal directory is on blocks 2-5 and is not so well documented, but I
can post a description if anyone needs it.
-- 

Dave Seaman
..!pur-ee!pucc-i:ags

"Against people who give vent to their loquacity 
by extraneous bombastic circumlocution."

glen@intelca.UUCP (Glen Shires) (03/27/84)

Byte magazine once had an article complete with program listings
for disk file transfers:

	Apple ][ Pascal		from/to      DOS 3.3

It should work on the //e.
Check the indexes in December Bytes, try around 1982.