From: gt8134b@prism.gatech.EDU (Howlin' Bob) Subject: Re: DPMI under dosemu (was Re: DOSEMU Success list!!) Date: 17 Mar 1993 06:27:05 GMT
In <1993Mar17.023742.21674@ugle.unit.no> agulbra@flipper.pvv.unit.no (Arnt Gulbrandsen) writes:
>In article <PNAKADA.93Mar16153700@pnakada.oracle.com> pnakada@oracle.com (Paul Nakada) writes:
>>because linux uses the virtual 8086 mode of the 386 processor. From
>>this, I gather that Windows does not use the virtual 8086 mode of the
>>386 to implement its dos box.
>Windows does use the V86 mode. Many 386 apps run just fine in V86
>mode since the 32-bit registers and instructions are available. Some,
I have to clean up dosemu so that it preserves the upper 16 bits of the
32-bit registers always...a lot of the "BIOS" calls now will trash the
upper 16 bits. But, in theory, it works. I have pkzip 2.04e (I suppose)
using 32-bit instructions now, and it seems to work ok.
>generally those that want more than 640k, require DPMI. I don't know
>if Windows supports DPMI, but seem to remember having heard somewhere
>that it does.
Yes, Windows supports DPMI. As does the OS/2 DOS box.
>>The question is, can a linux dos box be implemented in a similar fashion?
>Yes (with slight reservations). But as an earlier poster noted, some
>features of the 386 design don't exactly help, and DPMI is _not_
>something you hack together during a lunch break. Ralf Brown's
>interrupt list documents DPMI thoroughly enough to scare off me, but
>you may be made of sterner stuff.
Well, I wouldn't say "stern," but perhaps thickheaded... DPMI isn't
so bad in itself, mostly just fiddling with the LDT, but there are
a lot of serious technical problems in running DPMI under Linux.
One of the most bothersome will be keeping the same level of V86-like
functionality for a protected mode task...I still have to emulate all
the "illegal" instructions, like I/O, sti, cli, pushf, popf, etc.
It will be work. On top of that, I'm not exactly sure how well Linux
will react to me changing CS and DS from the default LDT entries 1 and 2...
the kernel seems to assume LDT entries 1 and 2 everywhere.
Needless to say, if anyone feels up to helping me, they are most welcome to
volunteer :-)
Robert
-- Robert Sanders Georgia Institute of Technology, Atlanta Georgia, 30332 uucp: ...!{decvax,hplabs,ncar,purdue,rutgers}!gatech!prism!gt8134b Internet: gt8134b@prism.gatech.edu