On Thu, Feb 12, 2004 at 04:11:34AM -0200, synthespian wrote:
> Hello --
> 
>  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. 
>  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.

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.

-- 
Ryan Underwood, <[EMAIL PROTECTED]>

Attachment: signature.asc
Description: Digital signature

Reply via email to