Using int 13 while BSD is running

Dan Nelson dnelson at allantgroup.com
Tue Mar 9 22:59:51 PST 2004


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 at allantgroup.com


More information about the freebsd-questions mailing list