On Thu, Feb 12, 2004 at 04:11:34AM -0200, synthespian wrote:
> > I have a "special need" wrt DOSEMU: I
> > have this excellent book on
> > programming for hardware (device
> > drivers), but it's written only for
> > DOS/Win32. But it's a /very/ good
> > book, full of C code.
> > As I don't have a DOS/Windows
> > platform and I would really like to
> > use this book, I was wondering if
> > DOSEMU could help me.=20
> > I wonder if you implement device
> > control in a standard DOS way, using
> > wrappers that remain faithful to the
> > DOS original. I imagine that, by
> > studying your code, I could learn how
> > to program the stuff I want, while at
> > the same time beeing able to use the
> > book /and/ learning about Linux.
Ryan Underwood wrote:
> Device drivers in DOSEMU that need to access hardware/host OS resources
> are implemented in a static manner; i.e. the necessary ISR is already
> installed at the time when you start dosemu. You can hook those ISR to
> add your own functionality, but you will not be able to access the
> hardware (port I/O or IRQ) of the host machine without specifically
> allowing DOSEMU to do so (see $_ports and friends). Only the drivers
> that are installed when DOSEMU is started are allowed to access host
> hardware otherwise.
>
>
> That said, what type of device are you programming? If it is controlled
> just through some hardware registers and polling, $_ports should work
> for you. If it needs an interrupt, you need to also pass its IRQ to
> dosemu through the config file and make sure linux doesn't have
> something already on that IRQ. This is for DOS drivers; I don't know
> anything about how Windows drivers would interact with DOSEMU.
All my DOS application can't do is toggle 2 pins of the par-port.
No interupts. dosemu-1.1.99 as root, won't do it, even with
editing dosemu.conf to:
$_ports { device /dev/lp1 fast range 0x378 0x37f } # lpt1
and other combinations
Under DOS these are the correct port addresses.
Has any body ever done this ?
== Chris Glur.
-
To unsubscribe from this list: send the line "unsubscribe linux-msdos" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at http://vger.kernel.org/majordomo-info.html