So nothing fancy?
I am going to wait for a while in case someone comes up with a usage of LEA I can't think of.
Main Topics
Browse All TopicsThis has been puzzling me for a while - of what use is the LEA instruction?
To me it just looks like a MOV instruction which can take a relatively-complex second argument - nothing that can't be done with a MOV, a MUL and an ADD. I know (I think) it was created for loading table/array offsets with indices, but what makes it worth the trouble of implementing, except for conforming to a CISC architecture that is already very complex?
I know it's fast - lea eax, [8*eax+eax] is better than a mul eax, 9, but are there any special 'LEA' tricks?
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
LEA comes for "free", the address calculation pipeline already does this exact kind of thing, so why not make its results available as a separate instruction? And it's a fast instruction, compared to MUL which used to take dozens of cycles.
Another good thing about LEA is it doesnt affect the flags. So you can do multiple-precision arithmetic and calculate the next address without having to push/pop flags.
Business Accounts
Answer for Membership
by: dimitryPosted on 2005-02-18 at 01:42:07ID: 13343788
You've actually described very well its purpose.
It is in x86 assembler to load table, array r whatever address to register, but also can be used "in tricky" way to make arithmetic
calcultions, like multiplication...