Difference between revisions of "Assembler:Commands:LEA"

From Cheat Engine
Jump to navigation Jump to search
(Created page with ''''command''' lea ''destination'', ''source'' Load Effective Address Computes the effective address of the second operand (the source operand) and stores it in the first operan…')
 
 
(6 intermediate revisions by the same user not shown)
Line 1: Line 1:
 +
[[Category:Assembler]]
 
'''command''' lea ''destination'', ''source''
 
'''command''' lea ''destination'', ''source''
  
Line 6: Line 7:
  
 
This is also use for some arithmetic.
 
This is also use for some arithmetic.
  lea eax,[eax+100*5] // eax = eax + (100 * 5)
+
  lea eax,[eax+64*5] // eax = eax + (100 * 5)
 
  lea eax,[eax+edx*5] // eax = eax + (edx * 5)
 
  lea eax,[eax+edx*5] // eax = eax + (edx * 5)
  
Line 13: Line 14:
 
Computes the effective address of the second operand (the source operand) and stores it in the first operand (destination operand). The source operand is a memory address (offset part) specified with one of the processors addressing modes; the destination operand is a general-purpose register. The address-size and operand-size attributes affect the action performed by this instruction, as shown in the following table. The operand-size attribute of the instruction is determined by the chosen register; the address-size attribute is determined by the attribute of the code segment.
 
Computes the effective address of the second operand (the source operand) and stores it in the first operand (destination operand). The source operand is a memory address (offset part) specified with one of the processors addressing modes; the destination operand is a general-purpose register. The address-size and operand-size attributes affect the action performed by this instruction, as shown in the following table. The operand-size attribute of the instruction is determined by the chosen register; the address-size attribute is determined by the attribute of the code segment.
  
[http://x86.renejeschke.de/html/file_module_x86_id_153.html x86.renejeschke.de/html/file_module_x86_id_153.html]
+
[http://c9x.me/x86/html/file_module_x86_id_153.html c9x.me/x86/html/file_module_x86_id_153.html]
 
</div>
 
</div>
  
Line 43: Line 44:
 
  lea rax,[rax+rdx*8]
 
  lea rax,[rax+rdx*8]
  
== See also ==
+
{{AssemblerCommandSeeAlso}}
* [[Assembler]]
 
* [[Cheat_Engine:Auto Assembler|Auto Assembler]]
 
* [[Assembler:Commands|Assembler Commands]]
 
  
== External links ==
+
{{Template:AssemblerCommandExternalLinks}}
* [https://wikipedia.org/wiki/X86_instruction_listings wikipedia.org/wiki/X86_instruction_listings]
 
* [https://wikibooks.org/wiki/X86_Assembly/Other_Instructions wikibooks.org/wiki/X86_Assembly/Other_Instructions]
 
* [http://www.asmpedia.org/index.php?title=Main_Page asmpedia.org]
 

Latest revision as of 15:48, 3 January 2018

command lea destination, source

Load Effective Address

Computes the effective address of the second operand (the source operand) and stores it in the first operand (destination operand).

This is also use for some arithmetic.

lea eax,[eax+64*5] // eax = eax + (100 * 5)
lea eax,[eax+edx*5] // eax = eax + (edx * 5)


Computes the effective address of the second operand (the source operand) and stores it in the first operand (destination operand). The source operand is a memory address (offset part) specified with one of the processors addressing modes; the destination operand is a general-purpose register. The address-size and operand-size attributes affect the action performed by this instruction, as shown in the following table. The operand-size attribute of the instruction is determined by the chosen register; the address-size attribute is determined by the attribute of the code segment.

c9x.me/x86/html/file_module_x86_id_153.html


Command Parameters[edit]

Parameter Description
destination The destination operand
source The source operand


Examples[edit]

lea ax,[ax+5*2]
lea ax,[ax+dx*2]
lea eax,[eax+5*4]
lea eax,[eax+edx*4]
lea rax,[rax+5*8]
lea rax,[rax+rdx*8]

See also[edit]

External links[edit]