﻿# 64\-bit

In this article, I've collected a huge amount of links all of which could prove potentially useful to software developers who are getting acquainted with 64\-bit world\. In general, we will cover C/C\+\+ languages, but I am sure, that developers from other languages will discover a lot of interesting stuff here as well\.

## The definition of a 64\-bit system and overview of its evolution

1. John R\. Mashey\. [The Long Road to 64 Bits](https://queue.acm.org/detail.cfm?id=1165766)\.
1. Wikipedia\. [64\-bit computing](https://en.wikipedia.org/wiki/64-bit_computing)\.

## Architecture of 64\-bit systems

1. Sachin R Sangoi\. [The 64 bit OS Architecture](https://www.codeproject.com/articles/14156/the-64-bit-os-architecture)\.
1. Andrey Karpov\. [AMD64 \(EM64T\) architecture](https://pvs-studio.com/en/blog/posts/a0029/)\.
1. Wikipedia\. [Itanium \(IA\-64\)](https://en.wikipedia.org/wiki/Itanium)\.
1. Wikipedia\. [x86\-64 \(x64, AMD64, Intel64\)](https://en.wikipedia.org/wiki/X86-64)\.
1. Jeremy Gordon\. [Writing 64\-bit programs](http://www.godevtool.com/GoasmHelp/64bits.htm)\.
1. Eric Palmer\. [CPUID for x64 Platforms and Microsoft Visual Studio\* \.NET 2005](https://software.intel.com/content/www/us/en/develop/topics/modern-code.html)\.
1. [Stack frame layout on x86\-64](https://eli.thegreenplace.net/2011/09/06/stack-frame-layout-on-x86-64/)\.
1. Mike Becker\. [Accessing 32\-bit DLLs from 64\-bit code](https://blog.mattmags.com/2007/06/30/accessing-32-bit-dlls-from-64-bit-code/)\. 
1. [The history of calling conventions, part 5: amd64\.](https://devblogs.microsoft.com/oldnewthing/2004/01/14) 
1. Andrey Karpov\. [The reasons why 64\-bit programs require more stack memory](https://pvs-studio.com/en/blog/posts/cpp/0069/)\.
1. Knowledge Base\. [What advantages do 64\-bit processors have over 32\-bit ones?](https://pvs-studio.com/en/blog/posts/k0002/)
1. Knowledge Base\. [Why do 64\-bit applications work faster than 32\-bit ones?](https://pvs-studio.com/en/blog/posts/k0003/)

## Data model, types' sizes, alignment

1. [Data model](https://pvs-studio.com/en/blog/terms/0012/)\.
1. [64\-Bit Programming Models: Why LP64?](http://www.unix.org/version2/whatsnew/lp64_wp.html)
1. [Why did the Win64 team choose the LLP64 model?](https://devblogs.microsoft.com/oldnewthing/2005/01/31)
1. Kang Su Gatlin\. [Windows Data Alignment on IPF, x86, and x64](https://www.microsoft.com/en-us/download/details.aspx?id=55979)\.
1. Andrey Karpov\. [About size\_t and ptrdiff\_t](https://pvs-studio.com/en/blog/posts/cpp/a0050/)\.
1. Dan Saks\. [Why size\_t matters](https://www.embedded.com/why-size_t-matters/)\.

## Course on 64\-bit application development

1. [What 64\-bit systems are\.](https://pvs-studio.com/en/blog/lessons/0001/)
1. [Support of 32\-bit applications\.](https://pvs-studio.com/en/blog/lessons/0002/)
1. [Porting code to 64\-bit systems\. The pros and cons\.](https://pvs-studio.com/en/blog/lessons/0003/)
1. [Creating the 64\-bit configuration\.](https://pvs-studio.com/en/blog/lessons/0004/)
1. [Building a 64\-bit application\.](https://pvs-studio.com/en/blog/lessons/0005/)
1. [Errors in 64\-bit code\.](https://pvs-studio.com/en/blog/lessons/0006/)
1. [The issues of detecting 64\-bit errors\.](https://pvs-studio.com/en/blog/lessons/0007/)
1. [Static analysis for detecting 64\-bit errors\.](https://pvs-studio.com/en/blog/lessons/0008/)
1. [Pattern 01\. Magic numbers\.](https://pvs-studio.com/en/blog/lessons/0009/)
1. [Pattern 02\. Functions with variable number of arguments\.](https://pvs-studio.com/en/blog/lessons/0010/)
1. [Pattern 03\. Shift operations\.](https://pvs-studio.com/en/blog/lessons/0011/)
1. [Pattern 04\. Virtual functions\.](https://pvs-studio.com/en/blog/lessons/0012/)
1. [Pattern 05\. Address arithmetic\.](https://pvs-studio.com/en/blog/lessons/0013/)
1. [Pattern 06\. Changing an array's type\.](https://pvs-studio.com/en/blog/lessons/0014/)
1. [Pattern 07\. Pointer packing\.](https://pvs-studio.com/en/blog/lessons/0015/)
1. [Pattern 08\. Memsize\-types in unions\.](https://pvs-studio.com/en/blog/lessons/0016/)
1. [Pattern 09\. Mixed arithmetic\.](https://pvs-studio.com/en/blog/lessons/0017/)
1. [Pattern 10\. Storage of integer values in double\.](https://pvs-studio.com/en/blog/lessons/0018/)
1. [Pattern 11\. Serialization and data interchange\.](https://pvs-studio.com/en/blog/lessons/0019/)
1. [Pattern 12\. Exceptions\.](https://pvs-studio.com/en/blog/lessons/0020/)
1. [Pattern 13\. Data alignment\.](https://pvs-studio.com/en/blog/lessons/0021/)
1. [Pattern 14\. Overloaded functions\.](https://pvs-studio.com/en/blog/lessons/0022/)
1. [Pattern 15\. Growth of structures' sizes\.](https://pvs-studio.com/en/blog/lessons/0023/)
1. [Phantom errors\.](https://pvs-studio.com/en/blog/lessons/0024/)
1. [Working with patterns of 64\-bit errors in practice\.](https://pvs-studio.com/en/blog/lessons/0025/)
1. [Optimization of 64\-bit programs\.](https://pvs-studio.com/en/blog/lessons/0026/)
1. [Peculiarities of creating installers for a 64\-bit environment\.](https://pvs-studio.com/en/blog/lessons/0027/)
1. [Estimating the cost of 64\-bit migration of C/C\+\+ applications\.](https://pvs-studio.com/en/blog/lessons/0028/)

## Various articles

1. Andrey Karpov\. [A Collection of Examples of 64\-bit Errors in Real Programs](https://pvs-studio.com/en/blog/posts/cpp/a0065/)\.
1. [64\-bit ODBC](https://www.easysoft.com/developer/interfaces/odbc/64-bit.html)\.
1. [Migrating 32\-bit Managed Code to 64\-bit](https://msdn.microsoft.com/en-us/library/ms973190.aspx)\.
1. [Checklist for 64\-bit Microsoft Windows Drivers](https://msdn.microsoft.com/library/windows/hardware/ff557573)\.
1. Andrey Karpov\. [A 64\-bit horse that can count](https://pvs-studio.com/en/blog/posts/cpp/a0043/)\.
1. Andrey Karpov\. [Problems of testing 64\-bit applications](https://pvs-studio.com/en/blog/posts/cpp/a0006/)\.
1. Andrey Karpov\. [64\-bit programs and floating\-point calculations](https://pvs-studio.com/en/blog/posts/cpp/0074/)\.

## Building the applications

1. Andrey Karpov\. [Seven Steps of Migrating a Program to a 64\-bit System](https://pvs-studio.com/en/blog/posts/cpp/a0042/)
1. Bojan Komazec\. [32\-bit and 64\-bit versions of Windows C\+\+ application](https://www.bojankomazec.com/2011/10/32-bit-and-64-bit-versions-of-windows-c.html)\.
1. Daniel Pistelli\. [Moving to Windows Vista x64](https://www.codeproject.com/articles/17263/moving-to-windows-vista-x64)\.
1. Knowledge Base\. [The warnings C4311 and C4312 generated by the compiler when using the /Wp64 switch](https://pvs-studio.com/en/blog/posts/cpp/k0008/)
1. Knowledge Base\. [How to compile a 64\-bit application with using Visual C\+\+ Express 2005/2008/2010?](https://pvs-studio.com/en/blog/posts/k0009/)
1. Knowledge Base\. [A common error occurring when compiling a 64\-bit application: error C2440, OnTimer](https://pvs-studio.com/en/blog/posts/cpp/k0011/)
1. Knowledge Base\. [Strange errors occurring when compiling the 64\-bit version of an application, error C2664](https://pvs-studio.com/en/blog/posts/cpp/k0012/)
1. Knowledge Base\. [A common error occurring when compiling a 64\-bit application: error C4235, Assembler](https://pvs-studio.com/en/blog/posts/k0013/)
1. Knowledge Base\. [How can I know if the DWORD\_PTR type is defined using ifdef?](https://pvs-studio.com/en/blog/posts/cpp/k0014/)
1. Knowledge Base\. [Why does not Visual C\+\+ support the inline assembler for Intel 64 and IA\-64 anymore?](https://pvs-studio.com/en/blog/posts/k0015/)
1. Knowledge Base\. [Warning C4267 in the expression unsigned n \= str\.find\(substr\)](https://pvs-studio.com/en/blog/posts/cpp/k0027/)
1. Knowledge Base\. [How to check if a 64\-bit project is being built in Visual Studio using \#ifdef](https://pvs-studio.com/en/blog/posts/k0032/)
1. Knowledge Base\. [Using \_WIN64/WIN64 macros](https://pvs-studio.com/en/blog/posts/k0040/)

## Miscellaneous

1. Andrey Karpov\. [A nice 64\-bit error in C](https://pvs-studio.com/en/blog/posts/cpp/0033/)\.
1. Knowledge Base\. [How to correctly print a value of the types \_\_int64, size\_t, and ptrdiff\_t](https://pvs-studio.com/en/blog/posts/cpp/k0046/)
1. Knowledge Base\. [Is it possible to use more than 2 Gbytes of memory in a 32\-bit program launched in the 64\-bit Windows?](https://pvs-studio.com/en/blog/posts/k0001/)
1. Knowledge Base\. [How to correctly cast a pointer to int in a 64\-bit application?](https://pvs-studio.com/en/blog/posts/cpp/k0005/)
1. Knowledge Base\. [How can a 32\-bit program detect that it is launched in a 64\-bit Windows?](https://pvs-studio.com/en/blog/posts/cpp/k0016/)
1. Knowledge Base\. [Functions of the ntohl/htonl class and 64\-bit values](https://pvs-studio.com/en/blog/posts/cpp/k0018/)
1. Knowledge Base\. [Difference between %p and %x](https://pvs-studio.com/en/blog/posts/cpp/k0019/)
1. Knowledge Base\. [Why is the value of the ProgramFiles environment variable replaced with that of ProgramFiles\(x86\)?](https://pvs-studio.com/en/blog/posts/k0020/)
1. Knowledge Base\. [Is there a way to make the type size\_t 32\-bit in a 64\-bit program?](https://pvs-studio.com/en/blog/posts/cpp/k0021/)
1. Knowledge Base\. [Is size\_t a standard type in C\+\+? And in C?](https://pvs-studio.com/en/blog/posts/k0022/)
1. Knowledge Base\. [Why does Windows put 64\-bit units into System32?](https://pvs-studio.com/en/blog/posts/k0028/)
1. Knowledge Base\. [WOW6432Node and API\-functions RegOpenKeyEx / RegEnumKeyEx](https://pvs-studio.com/en/blog/posts/k0029/)
1. Knowledge Base\. [Why does WoW64 use register and file system redirection?](https://pvs-studio.com/en/blog/posts/k0030/)
1. Knowledge Base\. [Confusion of WPARAM with UINT, and LPARAM with LONG](https://pvs-studio.com/en/blog/posts/cpp/k0031/)
1. Knowledge Base\. [How much memory can an application access in Win32 and Win64?](https://pvs-studio.com/en/blog/posts/k0036/)
1. Knowledge Base\. [What can I use instead of "int 3" instruction in a 64\-bit application?](https://pvs-studio.com/en/blog/posts/k0035/)
1. Knowledge Base\. [Can I use 32\-bit pointers in a 64\-bit application?](https://pvs-studio.com/en/blog/posts/cpp/k0033/)
1. Knowledge Base\. [How can I find out in a 32\-bit application what 64\-bit processes are launched?](https://pvs-studio.com/en/blog/posts/k0034/)
1. Knowledge Base\. [What can I use instead of rundll32\.exe to run 64\-bit DLL?](https://pvs-studio.com/en/blog/posts/k0037/)
1. Knowledge Base\. [Why is it so hard to create a 64\-bit version of an application?](https://pvs-studio.com/en/blog/posts/k0038/)
1. Knowledge Base\. [How can I find out in Win64 how many processor cores there are in the system?](https://pvs-studio.com/en/blog/posts/k0039/)
1. Knowledge Base\. [Why do 64\-bit operating systems use only 48\-bit addresses for addressing?](https://pvs-studio.com/en/blog/posts/k0042/)
1. Knowledge Base\. [What is the POINTER\_32 macro?](https://pvs-studio.com/en/blog/posts/k0043/)
1. Knowledge Base\. [What does the pointer size depend on in C\+\+ on different platforms?](https://pvs-studio.com/en/blog/posts/cpp/k0044/)

## My invitations

1. I invite you to follow our twitter [@Code\_Analysis](https://twitter.com/Code_Analysis) or [Viva64](https://www.reddit.com/r/viva64/) subreddit\. Subjects: C/C\+\+, 64\-bit systems, testing, algorithms and other interesting programming stuff\.
1. I offer you to download the trial of [PVS\-Studio](https://pvs-studio.com/en/pvs-studio/) static code analyzer to ensure the reliability of your 64\-bit applications\.