Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 9 Mar 2004 22:12:31 -0800 
From:      Jason Dictos <jason.dictos@yosemitetech.com>
To:        'Sergey 'DoubleF' Zaharchenko ' <doublef@tele-kom.ru>, Jason Dictos <jason.dictos@yosemitetech.com>
Cc:        "''freebsd-questions@freebsd.org' '" <freebsd-questions@freebsd.org>
Subject:   RE: Using int 13 while BSD is running
Message-ID:  <E50A109EE98AA049BAA09D725DB0714F01AD3BB0@mail.tapeware.com>

next in thread | raw e-mail | index | archive | help
Aren't the nodes "/dev/ad[0-9] (ide) or /dev/da[0-9] (scsi/usb)" created by
their device drivers, i.e. protected mode device drives? That would mean
that I would have to make sure that the hardware is supported by a device
driver, whereas if I had raw int 13 access I would be garanteed access to
the drive the system booted from, and any other bios addressable device,
without having to load any driver for the hardware. 

-Jason

-----Original Message-----
From: Sergey 'DoubleF' Zaharchenko
To: Jason Dictos
Cc: 'freebsd-questions@freebsd.org'
Sent: 3/9/2004 9:12 PM
Subject: Re: Using int 13 while BSD is running

On Tue, 9 Mar 2004 14:03:34 -0800 
Jason Dictos <jason.dictos@yosemitetech.com> 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"

______________________________________________________________________
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email 
______________________________________________________________________



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?E50A109EE98AA049BAA09D725DB0714F01AD3BB0>