2 Replies - 812 Views - Last Post: 25 July 2018 - 12:07 PM Rate Topic: -----

#1 iubianca   User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 4
  • Joined: 25-July 18

Load effective address

Posted 25 July 2018 - 11:03 AM

I have this code
lea     ecx, [ebp+var_3]

:code:
var_3 is actually -0Ch is a local variable in my function
Could you please explain to me what will be in ecx?
The address of te variable at address ebp+var_3 or the actual value?
Is This A Good Question/Topic? 0
  • +

Replies To: Load effective address

#2 modi123_1   User is online

  • Suitor #2
  • member icon



Reputation: 14691
  • View blog
  • Posts: 58,718
  • Joined: 12-June 08

Re: Load effective address

Posted 25 July 2018 - 12:03 PM

Have you tried chucking into a project and running it?
Was This Post Helpful? 0
  • +
  • -

#3 sepp2k   User is offline

  • D.I.C Lover
  • member icon

Reputation: 2708
  • View blog
  • Posts: 4,318
  • Joined: 21-June 11

Re: Load effective address

Posted 25 July 2018 - 12:07 PM

The address.

As you said, lea stands for "load effective address", not "load value". To do the latter, you'd use mov.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1