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

Re: Init from AS



If you're into code stripping, and you just want to have a Q&D disk formatter 
for 5.25" disks to use while working in Applesoft, you could break all of the 
rules and steal the INIT low-level formatting code out of DOS 3.3, and use that
as a guide.  You might have to find some other routines, too, but I kind of 
doubt it.  All you need is the code that directly drives the disk controller, 
and provides all the right commands to actually, physically format the disk.  
Then, instead of continuing to the DOS routines to create the VTOC and 
directory, write DOS to the disk, and SAVE the current program, you could jump 
to one of the aforementioned 'soft-format' routines to set up Block 0, and 
create the ProDOS file structure.  Then, all you'd have to do is copy PRODOS 
and BASIC.SYSTEM over to the disk to make it bootable--and that isn't as big a 
deal; certainly not necessary when creating a quick data disk.

Note that this is speculation that you could do this; I haven't tried.  I 
presume you have been in the frustrating situation:
]SAVE MASTERPIECE
{beep}DISK FULL
So, you grab your last 'blank' disk...
]SAVE MASTERPIECE
{BZZZT!  BZZT!  beep}I/O ERROR
and you would LIKE to be able to...
]- INIT
without trouncing your 'masterpiece'.

Of course, this isn't exactly kosher, but it might be easier to find the INIT 
code in DOS, where it will always be in the same place, than to try and strip 
it out of, say, the ProDOS System Disk.  Since the low-level format for 5.25" 
disks requires that the software talk to the controller directly (the 
controller doesn't have the know-how, and neither do DOS RWTS or PDOS Block 
Read/Write), the code will probably transfer without causing too much trouble 
with ProDOS...in other words, the code completely by-passes the ProDOS 
operating system until the low-level work is done.

Good luck!
--Dave Althoff, Jr.
(I just use DOS to begin with...INIT THE LAST FILE, and it's done!)