On moving applications to the x64 world

Posted: (EET/GMT+2)

 

Almost all new server machines today run 64-bit editions of Windows, with the older 32-bit editions becoming a minority fast. On the workstation side, 64-bit x64 systems have been used for many years already especially in the technical audience, but my feeling is that 64 bit PCs will soon start to become mainstream even on consumer computers.

For us developers, moving to the new, wider world can be terrific. No more those 2 gigabyte limitations in address space, nor mess-ups with all those five or six different Win32 calling conventions like stdcall and cdecl. On the low-level side, in 64-bit mode, the processor has new registers, and all those now start with the letter R. The general purpose registers then include RAX, RBX, RCX, RDX and R8-R15, plus others. Enough registers for many native code applications!

For .NET developers, moving to the x64 world is even simpler, because starting with .NET 2.0 introduced already in 2005. Of course, if your application is using platform invoke (p/invoke) to Win32 APIs a lot, then of course you might need to adjust the code you’ve written. But the more you keep your code managed, the better off you are.

If you need more information, I suggest starting with Matt Pietrek's excellent article titled "Everything You Need To Know To Start Programming 64-Bit Windows Systems". The article is skim on .NET development side, but the lower lever stuff is great. Of course, Intel would be the de-facto source for native developers.