flat assembler
Message board for the users of flat assembler.
Index
> Windows > [Beginner] Instruction LEA |
Author |
|
Linasm 03 Dec 2004, 13:37
How I use instruction LEA? I would like a very simple example for fasm.
|
|||
03 Dec 2004, 13:37 |
|
vbVeryBeginner 03 Dec 2004, 19:44
test1 db 'this is string',0
lea eax,[test1] store the address of test1 into eax |
|||
03 Dec 2004, 19:44 |
|
vbVeryBeginner 03 Dec 2004, 19:51
which is equal to
mov eax,test1 |
|||
03 Dec 2004, 19:51 |
|
Madis731 03 Dec 2004, 22:04
I know another use for LEA
Code: mov eax,15 ;eax=15 lea eax,[eax*4+eax] ; eax=75 lea eax,[eax*8+eax] ; eax=675 ... ;or edi=esi<<3-edx lea edi,[esi*8-edx] ... ;or eax=4*ebx+ecx-24 lea eax,[4*ebx+ecx-24] ;USE your imagination, but caution - this instruction ;is long and penalty might occur |
|||
03 Dec 2004, 22:04 |
|
Nikolay Petrov 05 Dec 2004, 15:09
Madis is a good simple
|
|||
05 Dec 2004, 15:09 |
|
Linasm 07 Dec 2004, 02:55
Thanks for help-me.
|
|||
07 Dec 2004, 02:55 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.