Jaa


Executing 32-bit applications on 64-bit

[go to https://blogs.msdn.com/volkerw/archive/2008/07/24/executing-32-bit-application-in-64-bit.aspx for updated links]

64-bit will soon be everywhere.
So, will all application have to be rewritten?

I guess not. Windows on Itanium, AMD-64 or Xeon EM64T supports the execution of 32-bit applications. You can install programs like WinWord, Excel and many many other non-MS applications w/o any problems on a 64-bit Windows OS. These applications will just run as they would on 32-bit Windows. From an executable’s perspective it is just Windows.

That said, if you want your application to take full advantage of the 64-bit OS, you will have to migrate your source code to 64-bit. And if we talk about typical server applications that need to be very responsive or serve lots of clients – typical service applications – even though you can install them on 64-bit, a migration to 64-bit is highly recommended. In any case, there is no rule of thumb or general advice if, when and how to migrate to 64-bit. Just be aware that the near future will be 64-bit. Migration to 64-bit always implies either a migration to native 64-bit code or to the .Net framework. With the next generation of Visual Studio, Visual Studio 2005 (codename Whidbey) MS will ship the .Net framework for the 64-bit operating systems.

Back to the original question: Will all applications have to be rewritten to run on a 64-bit Windows operating system?

The precise answer to this question is: Yes and No. This blog will focus on the latter part of the answer. AMD’s 64-bit Athlon and Opteron processors are designed in a way that allows 32-bit opcodes to be executed natively on the chip like they would be on a 32-bit processor. The same is true for Intel’s Xeon EM64T. For Itanium the story is slightly different. Even though there is on die (on the processor chip) support for x86 code, Intel introduced what they called an EL or Emulation Layer. The EL is a layer helping the 64-bit CPU to “understand” the 32-bit opcodes.

The Windows operating system introduces a very slim layer, implemented in a set of DLLs, to give 32-bit applications access to the 64-bit OS. This layer is called WOW64 (Windows-on-Windows 64-bit) and does all the magic necessary to make 32-bit applications feel good on 64-bit Windows.

WOW64 and the built-in support of 32-bit on the processor enable the execution of 32-bit application in a 64-bit Windows environment. If you are interested in more details about 32-bit application installation and execution, below I put some reference information.

MSDN: WOW64 Implementation Details
MSDN: Running 32-bit Applications
AMD: WOWing Your 32-Bit Applications with 64-Bit Windows Part 1
AMD: WOWing Your 32-Bit Applications with 64-Bit Windows, Part 2
Intel: Getting Software Ready for Intel® Itanium® Architecture
Intel: IA-32 Execution Layer (EL)

Comments

  • Anonymous
    June 08, 2004
    I wish that your articles talked more about existing applications that install to the Control Panel in the 32 bit environment, how is that to work in the 64 bit. I find little to no information about the iuntention of 32 bit applications installing under the 64 bit that need to be a applet on the control panel and how the 64 bit ITANIUM OS is different.
    Marji Booker
    (hating 64 bit Itanium 2)

  • Anonymous
    June 15, 2008
    I estimate highly the above given material!!

  • Anonymous
    July 24, 2008
    It would be nice if the links to the references were valid.

  • Anonymous
    July 24, 2008
    Hi Jim, this post is from 2004. I would not expect any of the links to work anymore. Even the MSDN ones :( I'll try to update the post in the next couple of days.

  • Anonymous
    July 24, 2008
    Back on May 1st, 2004 I posted about 32-bit apps on 64-bit Windows and added some links to the post.

  • Anonymous
    July 24, 2008
    Back on May 1st, 2004 I posted about 32-bit apps on 64-bit Windows and added some links to the post.