What’s the purpose of the LEA instruction?

As others have pointed out, LEA (load effective address) is often used as a “trick” to do certain computations, but that’s not its primary purpose. The x86 instruction set was designed to support high-level languages like Pascal and C, where arrays—especially arrays of ints or small structs—are common. Consider, for example, a struct representing (x, … Read more

VirtualBox – Kernel requires an x86-64 cpu but only detected an i686 cpu

Intel i5-2410M CPU running at 2.30 GHz running a Windows 7 64-bit operating system. I have VirtualBox 4.13 installed. I am trying to run ubuntu-14.04-desktop-amd64.iso but I get an error this kernel requires an x86-64 cpu but only detected an i686 cpu I even enabled the Intel Virtualization in the BIOS settings and then tried … Read more

What’s the purpose of the LEA instruction?

As others have pointed out, LEA (load effective address) is often used as a “trick” to do certain computations, but that’s not its primary purpose. The x86 instruction set was designed to support high-level languages like Pascal and C, where arrays—especially arrays of ints or small structs—are common. Consider, for example, a struct representing (x, … Read more