From owner-freebsd-questions@FreeBSD.ORG Mon Jul 23 07:53:04 2012 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C8A001065675 for ; Mon, 23 Jul 2012 07:53:04 +0000 (UTC) (envelope-from perryh@pluto.rain.com) Received: from agora.rdrop.com (unknown [IPv6:2607:f678:1010::34]) by mx1.freebsd.org (Postfix) with ESMTP id 8AE628FC19 for ; Mon, 23 Jul 2012 07:53:04 +0000 (UTC) Received: from agora.rdrop.com (66@localhost [127.0.0.1]) by agora.rdrop.com (8.13.1/8.12.7) with ESMTP id q6N7r2ps092921 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Mon, 23 Jul 2012 00:53:02 -0700 (PDT) (envelope-from perryh@pluto.rain.com) Received: (from uucp@localhost) by agora.rdrop.com (8.13.1/8.14.2/Submit) with UUCP id q6N7r2sN092920; Mon, 23 Jul 2012 00:53:02 -0700 (PDT) (envelope-from perryh@pluto.rain.com) Received: from fbsd81 ([192.168.200.81]) by pluto.rain.com (4.1/SMI-4.1-pluto-M2060407) id AA14000; Mon, 23 Jul 12 00:41:55 PDT Date: Mon, 23 Jul 2012 07:41:28 -0700 From: perryh@pluto.rain.com To: bonomi@mail.r-bonomi.com Message-Id: <500d6298.mW4a90i/Zh2U1/xR%perryh@pluto.rain.com> References: <201207230403.q6N43iBQ029276@mail.r-bonomi.com> In-Reply-To: <201207230403.q6N43iBQ029276@mail.r-bonomi.com> User-Agent: nail 11.25 7/29/05 Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: freebsd-questions@freebsd.org Subject: Re: fsck on FAT32 filesystem? X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Jul 2012 07:53:04 -0000 Robert Bonomi wrote: > > MSDOS/PCDOS had no _documented_ functions to directly access the > > disks, bypassing the file system, but the functions _did_ exist. > > I'm sure you can provide the DOS 'function number' for those calls, > and cites to published data confirming. They may have involved a dedicated INT or two, e.g. INT 25H and/or INT 26H, rather than INT 21H with a function number in AX. I could have provided specifics 25 years ago :) when I was involved with this stuff on a daily basis. I have no idea whether it was ever published, but it was well known to those of us who were using it in system-level utilities. > > The debugger's "read sector" and "write sector" commands used them, > > and I suspect chkdsk, scandisk, and format probably also used them > > although I never had occasion to verify one way or the other. > > My experince in porting MSDOS 3.1 to a non pc-clone architecture was > that fdisk, format, chkdsk, debug, and sys all invoked INT 13H directly. I've got you beat in seniority :) I was mostly working on 2.x, and got out of the business somewhere around 3.1 or 3.2. I think I'd remember if our stuff had quit working when 3.x came along, but it's possible that those interfaces were only retained for compatibility -- to avoid breaking old 3rd-party code -- and that the MS userland had been revised to call the BIOS directly (since by then the market consisted almost entirely of PCs and clones -- decidedly not the case in the 2.0-2.1 timeframe). BTW fdisk _would_ always have had to use BIOS calls, or some other platform-specific mechanism, since the direct disk access in DOS was restricted to the DOS partition(s). The parameters were something like buffer address, logical drive number (0 => A:, 2 => C:, etc.), starting sector within the logical drive, and number of sectors.