[net.micro.mac] RamDisk technical query

vishniac@wanginst.UUCP (Ephraim Vishniac) (05/24/85)

I'm trying to understand what makes a Mac ramdisk "eject-proof."
I had originally been told that ramdisks that the finder thought were
on Appletalk (aka Applebus) would not be ejected.  Comparing the 
Assimilation process ramdisk to the Aztec C ramdisk, however, I see that
the finder believes both to be on AppleTalk.  The Assimilation ramdisk will
not be ejected; the Aztec one will.  I'm also told that the finder ignores
close errors from disk drivers; i.e., a driver cannot simply refuse to eject
a disk.  Is this really the case?

I've examined the drive queue and the volume control block queue in some
detail and been unable to find any useful difference between these two
ramdisks.  I've also examined the ramdisk drivers somewhat; I have
to rely on disassembly to look at the Assimilation driver, of course.

The purpose of this exercise to make sure that a ramdisk driver I'm 
writing for a Mac with megabyte memory will be difficult to dispose of
accidentally.  Can anyone shed some light, or point me to an especially
enlightening passage in Inside Mac (loose-leaf edition)?

-- 
Ephraim Vishniac
  [apollo, bbncca, cadmus, decvax, harvard, linus, masscomp]!wanginst!vishniac
  vishniac%Wang-Inst@Csnet-Relay

darin@tmq.UUCP (Darin Adler) (05/28/85)

> I'm trying to understand what makes a Mac ramdisk "eject-proof." ...
> 
> ... I've examined the drive queue and the volume control block queue in some
> detail and been unable to find any useful difference between these two
> ramdisks ...
> 
> ...  Can anyone shed some light, or point me to an especially
> enlightening passage in Inside Mac (loose-leaf edition)?
> 

The useful information is on pages 62 and 63 of the File Manager Programmer's
Guide (Inside Mac loose leaf 5/21/84).  In a box labeled Assembly-language note
we find the following table entry:

The first four bytes in a drive queue ...
byte 1, contents: 0=no disk in drive, 1 or 2=disk in drive, 8=NONEJECTABLE disk
		  in drive, FC-FF=disk was ejected in last 1.5 seconds.

Just stuff an 8 in there.

Darin Adler
ihnp4!tmq!darin