From owner-freebsd-questions@FreeBSD.ORG Tue Mar 9 22:59:51 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 616E716A4CE for ; Tue, 9 Mar 2004 22:59:51 -0800 (PST) Received: from dan.emsphone.com (dan.emsphone.com [199.67.51.101]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1C26843D49 for ; Tue, 9 Mar 2004 22:59:51 -0800 (PST) (envelope-from dan@dan.emsphone.com) Received: (from dan@localhost) by dan.emsphone.com (8.12.10/8.12.10) id i2A6xoGH005609; Wed, 10 Mar 2004 00:59:50 -0600 (CST) (envelope-from dan) Date: Wed, 10 Mar 2004 00:59:50 -0600 From: Dan Nelson To: Jason Dictos Message-ID: <20040310065950.GA94513@dan.emsphone.com> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-OS: FreeBSD 5.2-CURRENT X-message-flag: Outlook Error User-Agent: Mutt/1.5.6i 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 06:59:51 -0000 In the last episode (Mar 09), Jason Dictos said: > I'm investigating what resources are out there for accessing bios > addressable devices while BSD is up and running. 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. 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? That way we could package a stripped down BSD kernel which > loaded our driver and gave our application access to hard disks > without having to load any device driver. I guess it's possible, since you have to use the bios to make VESA video calls, and they work. /sys/i386/isa/vesa.c has most of the stuff you would need. Also see the i386_vm86() userland function; you may not even need to mess around inside the kernel. Alternatively, have you taken a look at FreeDOS? You can probably use your exisitng code unchanged on it, or use either DJGPP or OpenWatcom to build 32-bit executables that run under a DOS extender. www.freedos.org www.delorie.com www.openwatcom.org -- Dan Nelson dnelson@allantgroup.com