flat assembler
Message board for the users of flat assembler.
![]() |
Author |
|
Linasm
How I use instruction LEA? I would like a very simple example for fasm.
|
|||
![]() |
|
vbVeryBeginner
test1 db 'this is string',0
lea eax,[test1] store the address of test1 into eax |
|||
![]() |
|
vbVeryBeginner
which is equal to
mov eax,test1 |
|||
![]() |
|
Madis731
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 |
|||
![]() |
|
Nikolay Petrov
Madis is a good simple
![]() |
|||
![]() |
|
Linasm
Thanks for help-me.
![]() |
|||
![]() |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2020, Tomasz Grysztar. Also on GitHub, YouTube, Twitter.
Website powered by rwasa.