From owner-freebsd-questions@FreeBSD.ORG Tue Mar 9 21:13:06 2004 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id B511416A4CE for ; Tue, 9 Mar 2004 21:13:06 -0800 (PST) Received: from mx.tele-kom.ru (mx.tele-kom.ru [213.80.148.6]) by mx1.FreeBSD.org (Postfix) with SMTP id 25FA443D49 for ; Tue, 9 Mar 2004 21:13:05 -0800 (PST) (envelope-from doublef@tele-kom.ru) Received: (qmail 46661 invoked by uid 555); 10 Mar 2004 08:13:02 +0300 Received: from hal.localdomain (213.80.149.135) by t-k.ru with TeleMail/2 id 1078895581-46654 for jason.dictos@yosemitetech.com; Wed, 10 Mar 08:13:01 2004 +0300 (MSK) Date: Wed, 10 Mar 2004 08:12:00 +0300 From: Sergey 'DoubleF' Zaharchenko To: Jason Dictos Message-Id: <20040310081200.51b84ef1@Hal.localdomain> In-Reply-To: References: X-Mailer: Sylpheed version 0.9.9claws (GTK+ 1.2.10; i386-portbld-freebsd4.8) Mime-Version: 1.0 Content-Type: multipart/signed; protocol="application/pgp-signature"; micalg="pgp-sha1"; boundary="Signature=_Wed__10_Mar_2004_08_12_00_+0300_m3U9Vu7vS=cMcNXd" cc: "'freebsd-questions@freebsd.org'" Subject: Re: Using int 13 while BSD is running X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 Mar 2004 05:13:06 -0000 --Signature=_Wed__10_Mar_2004_08_12_00_+0300_m3U9Vu7vS=cMcNXd Content-Type: text/plain; charset=US-ASCII Content-Disposition: inline Content-Transfer-Encoding: 7bit On Tue, 9 Mar 2004 14:03:34 -0800 Jason Dictos probably wrote: > The situation is > this, currently we licenses Caldera DOS for a program we wrote which > uses the int13 extensions to manipulate the systems hard drive (i.e. > to recover partition tables and what not). This forces our application > to be written in 16 bit mode, but it does allows us to not have to > worry about loading any driver which would be hardware specific to > access the hard drive. Through the /dev/ad[0-9] (ide) or /dev/da[0-9] (scsi/usb) you can get access to any byte in you harddrive. They `look like' ordinary files to most programs. Just seek the appropriate number of bytes and read what you want (0-512 is the mbr, for example). You don't even need to write a line in assembly for that, just plain C (or even shell-script, if you prefer that). > Is there > any way to write a driver for BSD which would put the processor into > real mode, therefore allowing us to use the int 13 api of the bios to > read and write hard drives? Putting the cpu back into real mode is kind of perversion. And I don't think FreeBSD provides any real mode interface. Whatever you would see in real mode, you can bet it isn't a FreeBSD driver for your harddrive. -- DoubleF Romeo wasn't bilked in a day. -- Walt Kelly, "Ten Ever-Lovin' Blue-Eyed Years With Pogo" --Signature=_Wed__10_Mar_2004_08_12_00_+0300_m3U9Vu7vS=cMcNXd Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.4 (FreeBSD) iD8DBQFATqOrwo7hT/9lVdwRAinPAJ9rsC9Tzum5970w88Ze0o+skKwbTgCbBE0S 6bUkIwtlJePcYTsq1Ja/0gU= =F4fi -----END PGP SIGNATURE----- --Signature=_Wed__10_Mar_2004_08_12_00_+0300_m3U9Vu7vS=cMcNXd--