*BSD News Article 41419


Return to BSD News archive

Xref: sserve comp.os.386bsd.questions:16126 comp.os.386bsd.misc:5009
Path: sserve!newshost.anu.edu.au!harbinger.cc.monash.edu.au!news.cs.su.oz.au!news.adelaide.edu.au!yoyo.aarnet.edu.au!spasun.tpa.com.au!myall.awadi.com.au!myall!blymn
From: blymn@awadi.com.au (Brett Lymn)
Newsgroups: comp.os.386bsd.questions,comp.os.386bsd.misc
Subject: Re: dosemu (was: Re: [pcemu] anyone got it working?)
Date: 23 Jan 1995 03:25:45 GMT
Organization: AWA Defence Industries
Lines: 35
Distribution: world
Message-ID: <BLYMN.95Jan23135546@mallee.awadi.com.au>
References: <JUN.95Jan11130911@fox.fax.iwa.fujixerox.co.jp> <3f11jt$9f1@news1.best.com>
	<TRI.95Jan12161056@pooh.tky.hut.fi>
NNTP-Posting-Host: mallee.awadi.com.au
In-reply-to: tri@pooh.tky.hut.fi's message of 12 Jan 1995 14:10:56 GMT

>>>>> "Timo" == Timo J Rinne <tri@pooh.tky.hut.fi> writes:
In article <TRI.95Jan12161056@pooh.tky.hut.fi> tri@pooh.tky.hut.fi (Timo J. Rinne) writes:


    Timo> Ed Hudson <elh@best.com> wrote:
    >> i just wish that it was a 'pc486emu' program instead.

    Timo> In [34]86 environment it sure wouldn't be wise to emulate
    Timo> processor itself.  Approach of dosemu for Linux (and mdos of
    Timo> Mach) is much more effective and interesting.  As I wrote
    Timo> before, it doesn't seem to be too difficult to port onto
    Timo> FreeBSD, but I sure don't have time to do it.  If someone
    Timo> should do this, I'd like to know about it and maybe I could
    Timo> help somehow.

And, as I think I wrote before, you are making a tiny assumption which
breaks on *BSD.  Currently there is no _kernel_ support for the v86()
call which the Linux DOSEMU is based on.  Without this important call
you will get nowhere since most of the life of dosemu is spent in this
call.  In fact, at it's simplest, dosemu is just a loop around the v86
call with signal handlers to handle the vm86 generated events (things
like i/o and the like).  Unfortunately, at the kernel level the Linux
code is not much use apart from seeing how things are done.  Linus is
pretty helpful given the amount of time he can spend answering mail (I
would assume there is heaps of that).  The kernel changes that need to
be made are at the syscall interface and stuffing with the kernel
stack going in on the syscall and coming out of the trap handler.

BTW, IMHO the dosemu code is pretty bad - it reads like a much hacked
and patched bit of software and there are some clunky assumptions in
it which make it difficult to use without direct access to the display
adapter/keyboard (the Mach emulator suffers the same restrictions).

--
Brett Lymn