Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.2 9/5/84; site wanginst.UUCP Path: utzoo!watmath!clyde!burl!ulysses!gamma!epsilon!zeta!sabre!petrus!bellcore!decvax!wanginst!vishniac From: vishniac@wanginst.UUCP (Ephraim Vishniac) Newsgroups: net.micro.mac Subject: Undocumented driver control codes? Message-ID: <984@wanginst.UUCP> Date: Mon, 26-Aug-85 09:46:10 EDT Article-I.D.: wanginst.984 Posted: Mon Aug 26 09:46:10 1985 Date-Received: Wed, 28-Aug-85 20:11:36 EDT Distribution: net Organization: Wang Institute, Tyngsboro, Ma. 01879 Lines: 33 In the course of debugging a ramdisk driver, I've found that there are several undocumented(?) control codes that the finder uses to interact with disk drivers. The clearly documented ones are: 1 = kill (abort operation in progress and any queued operations) 7 = eject (spit disk) 8 = set tag buffer The undocumented ones are: 6 = erase (whole disk? some fixed number of sectors? some given number of sectors?) $14 = ? $15 = ? Code 6 is used only when the disk is erased. Codes 14 and 15 seem to be used whenever the volume is mounted. The .Sony driver does not support any of these - it just returns -$11 (controlErr) for any code except 1, 7, or 8. The Assimilation process ramdisk acts on code 6 by erasing as many sectors as given by the word at ApplScratch in low ram. I don't think that's right. My disk behaves acceptably if I erase the boot, map, and directory sectors in response to a 6. Does anyone know what $14 and $15 are supposed to do? Does anyone know *for certain* what 6 is supposed to do? Also, a bug in Macsbug: when disassembling moveq instructions with negative contants, the constant is complemented. For example, moveq #-$11,d0 would disassemble as moveq #-$6f,d0. (And vice-versa!) -- Ephraim Vishniac [apollo, bbncca, cadmus, decvax, harvard, linus, masscomp]!wanginst!vishniac vishniac%Wang-Inst@Csnet-Relay