LWN.net Logo

Indeed not only 32-bit

Indeed not only 32-bit

Posted Jan 24, 2009 1:20 UTC (Sat) by mjr (guest, #6979)
Parent article: Common Wine Myths

What was unmentioned is that Wine can also run 16-bit Windows software, unlike, say, 64-bit Vista.

'course, probably not a major focus for either developers or users at this point...


(Log in to post comments)

Indeed not only 32-bit

Posted Jan 24, 2009 17:23 UTC (Sat) by nlucas (subscriber, #33793) [Link]

64-bit Vista runs 16-bit applications just fine, although in a virtual machine.

Nothing new here, as that is a limitation of the processor, not of the system (you can't run 16-bit code on 64-bit mode as you can on 32-bit mode).

But I don't actually run any windows machine, so can't test it.

Indeed not only 32-bit

Posted Jan 24, 2009 18:22 UTC (Sat) by mjr (guest, #6979) [Link]

Hmh. I read in a Finnish computer mag that doesn't tend to get things that wrong that it doesn't do 16-bit code. (If you're talking about running a 32-bit windows in a VM, of course that'll do it at the latest...) Actually, as for Wine, the 64-bit version was last I checked slated to run semi-similarly only 64-bit code, while you can run the 32-bit version for 16/32-bit Windows code using the host kernel's 32-bit userland facilities.

Anyway, I have no first-hand knowledge — or interest — either, was just trying to be funny.

Indeed not only 32-bit

Posted Jan 24, 2009 18:48 UTC (Sat) by nlucas (subscriber, #33793) [Link]

It may well be that this is one of those features only available on the "enterprise"/"professional"/"server" versions of Vista.
Maybe the "basic"/"home" versions don't include the virtual machine to run those legacy 16-bit applications.

Anyway, not much interested to know the truth either.

Indeed not only 32-bit

Posted Feb 1, 2009 23:46 UTC (Sun) by GregMartyn (subscriber, #52300) [Link]

16 bit programs will not run on 64-bit vista:
http://support.microsoft.com/kb/926657

no 16-bit in long mode

Posted Jan 25, 2009 3:13 UTC (Sun) by tialaramex (subscriber, #21167) [Link]

I would imagine that Wine is also unable to run 16-bit Windows software (Win16) on 64-bit machines. The CPU simply doesn't have the capability to execute 16-bit 8086 era instructions once in 64-bit mode. Presumably your process takes an invalid instruction fault SIGILL, maybe Wine would catch that and just kill the Win16 application, or maybe it doesn't catch that signal and the whole Wine session would exit.

no 16-bit in long mode

Posted Jan 28, 2009 0:13 UTC (Wed) by bluefoxicy (guest, #25366) [Link]

in 32-bit mode, areas of memory can be marked with a page flag that says they contain 16-bit code. In 64-bit mode, no such luck. You need a full context switch to 32-bit mode to run 16-bit code. 26-bit code can run under a 64-bit OS, but only running a process native in 32-bit mode, since 32-bit protected mode supports 16-bit instructions.

Entering full-blown virtual 8086 mode is impossible, however.

no 16-bit in long mode

Posted Feb 16, 2010 22:15 UTC (Tue) by yuhong (guest, #57183) [Link]

Nope, it never worked that way. The way it really works on 386 and later processors is that every code segment is marked with a default operand/address size, either 16-bit for old 16-bit protected mode apps, or 32-bit for newer 32-bit apps. In fact, 64-bit/compatibility mode switching in long mode is similar too, with another bit being used to differ from compatibility mode vs 64-bit code segments, with most of the rest of the segment attributes being ignored for 64-bit code segments. And yes, 16-bit default operand size in compatibility mode is supported in long mode.

no 16-bit in long mode

Posted Feb 17, 2010 4:26 UTC (Wed) by viro (subscriber, #7872) [Link]

There's no V86 submode in long mode. IOW, with 64bit kernels you can run protected-mode userland just fine, including 16bit pieces, but with real-mode 16bit code you have serious trouble, Segments will work as for protected mode 16bit, which is not going to make real mode code happy at all. In particular, the lower bits of value loaded to segment selectors are treated as privelege level, etc.

You can get around that by playing with amd64 virtualization (i.e. run a guest in legacy mode and use _that_ to run 16bit real-mode code). If you don't have that, you are SOL - you pretty much have to emulate 8086. Instruction set is there, but address translation is incompatible.

Copyright © 2013, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds