[comp.sys.mac] Disk initializing help needed!

dlee@miro.Berkeley.EDU (David Lee) (12/24/86)

I have been playing around with the Package Manager (_Pack2) in trying to
initialize blank disks and have run into a problem. First, as stated in a
previous message I have been using the following assembly language procedures:
(note: SP=A7)

LoadInit
           MOVE.W   #2,-(SP)     ;Select DILoad routine
           _Pack2                ;Go load disk initializing routines
           RTS

InitDisk
           CLR.W    -(SP)
           MOVE.W   #2,-(SP)     ;Drive# (external)
           MOVE.W   #6,-(SP)     ;Select DIFormat routine
           _Pack2                ;Go initialize disk
           MOVE.W   (SP)+,D0     ;Get result code
           RTS

The first procedure, LoadInit, is called before the procedure, InitDisk,
which is suppose to initialize a disk in the external drive. I have traced
the problem to this bizarre condition: The InitDisk procedure will initialize
the disk in the external drive iff it is blank or uninitialized. If the disk
in the external drive has been already initialized, it doesn't do anything
but return an error code. I would like for some way to initialize a disk
regardless of whether it has already been initialized or not. I suspect
there might be some global variable involved with the Inialization Package
that can be used for this purpose. I would appreciate any help on the matter.

Thanks,
David Lee
dlee@miro.Berkeley.EDU