Path: utzoo!utgpu!news-server.csri.toronto.edu!bonnie.concordia.ca!thunder.mcrcim.mcgill.edu!snorkelwacker.mit.edu!apple!usc!sdd.hp.com!caen!ox.com!tbomb.ice.com!time From: time@tbomb.ice.com (Tim Endres) Newsgroups: comp.sys.mac.programmer Subject: Re: How does DIZero() work? Message-ID: <1CE00001.aber0o@tbomb.ice.com> Date: 1 Feb 91 22:56:18 GMT Reply-To: time@ice.com Organization: ICE Engineering, Inc. Lines: 20 X-Mailer: uAccess - Mac Release: 1.0.5+ In article <450016@hpnmdla.HP.COM>, dan@hpnmdla.HP.COM (Dan Pleasant) writes: > As the last step of disk initialization, the system makes a call > to DIZero(), which writes zeros on all the sectors of a disk. > How does DIZero() know how many tracks/sectors to zero out? > For a floppy disk, I assume DIZero() just queries the hardware > to find out what kind of foppy is in the drive. But what about > removeable hard disks and other non-floppy drives? The code simply looks in the Drive Queue data structure for the drive that is being zeroed for the number of Macintosh sectors on the drive. Since DIZero() works through the drive's driver, the driver handles mapping these Macintosh sectors to the appropriate device sectors. tim. ------------------------------------------------------------- Tim Endres | time@ice.com ICE Engineering | uupsi!ice.com!time 8840 Main Street | Voice FAX Whitmore Lake MI. 48189 | (313) 449 8288 (313) 449 9208