[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Init from AS
In article <CL5xwn.Fvq@actrix.gen.nz>,
David Empson <dempson@swell.actrix.gen.nz> wrote:
>In article <1994Feb9.202324.24836@roxi.rz.fht-mannheim.de>
>chk@aix01.rz.fht-mannheim.de (Karpp Christian) writes:
>> hi,
>> does anyone know if a simple basic program can be written under prodos to
>> format a disk (5.25" & 3.5")?
>
>Not a 5.25" disk. ProDOS doesn't contain any code to format a 5.25"
>disk - you have to write this code yourself (or license it from Apple.
>It is a moderately large amount of machine code.
>
>A 3.5" disk is somewhat easier, because the formatting routine is
>provided by the interface card and/or drive. This just does the
>physical format - it doesn't set up the boot block, volume directory
>or bitmap.
>
>If you wanted to make a bootable disk, you would still need the boot
>block image, and you have to set up the volume directory and bitmap,
>which is not trivial.
Well it would be a good idea to set up block 0 as it might be useful to make
the volume bootable later on. Strictly speaking, none of this is possible in
Applesoft of course. You can write assembly code to call the device driver to
do the format then put a volume directory and bitmap on the volume.
I wrote a program to do what I call a pseudo-format. It does everything but
the low level format. I can use it to convert disks in other formats to
ProDOS without reformatting for example. It's not trivial to do but not too
tough on the other hand.
--
Randy Shackelford "That's right, keep dancing
shack@crash.cts.com on the minefield"
-Al Bundy