Miscellaneous instructions

There are a few instructions without any particular category assigned to them, which are as follows:

  • Load effective address (LEA): This instruction calculates the effective address specified with one of the processor's addressing modes in the source operand and stores it in the destination operand. It is also frequently used instead of the ADD instruction when terms are specified as parts of the addressing mode. The following example code shows both cases:
lea eax, [some_label] ; EAX will contain the address of some_label
lea eax, [ebx + edi] ; EAX will contain the sum of EBX and EDI
  • No operation (NOP): As the name states, this instruction performs no operation and is often used for filling the gaps between aligned procedures.
  • Processor identification (CPUID): Depending on the value of the operand (in EAX), this instruction returns CPU identification information. This instruction is available only if the ID flag in the EFlags register (bit 21) is set.
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset