Re: [patch] vm86: Clear AC on INT

From: Kasper Dupont (
Date: Thu Aug 01 2002 - 12:04:36 EST

"Maciej W. Rozycki" wrote:
> On Thu, 1 Aug 2002, Kasper Dupont wrote:
> > Ehrm, that wasn't my point. My point was that if the feature exist
> > in virtual 86 mode but not in real mode, the kernel should prevent
> > it from being used in virtual 86 mode because it is supposed to
> > emulate real mode.
> The mode is supposed to emulate an 8086 which doesn't have the flag.

OK, but if it is only supposed to emulate an 8086 shouldn't it have
trapped on every instruction not existing on 8086? It doesn't and
that is quite fortunate, because we can then use it for other purposes
namely runing software that expects to have the entire computer for
itself in a multitasking environment. However it seems no matter how
we do it, what is emulated will not work exactly like any CPU in real

> Any "real mode" code that operates on the AC flag must have been
> created after i386 was released as it requires 32-bit instructions. Hence
> it has to be prepared to deal with the vm86 mode.

That does make some sense, but not all software written for i386 and
later processors does deal with vm86 in the desired way. Some software
was only intended for real mode when being written, but we might now
want to run it in virtual 86 mode. Thanks to emm386 we probably don't
see many DOS programs not working in virtual 86 mode, but emm386 itself
plain refuses to load in virtual 86 mode.

Kasper Dupont -- der bruger for meget tid på usenet.
For sending spam use
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

This archive was generated by hypermail 2b29 : Wed Aug 07 2002 - 22:00:16 EST