Find the answer to your Linux question:
Results 1 to 8 of 8
Is the opcode leal(load effective address) primarly used to calculated the address of a value that was pushed on the stack? If anyone knows of any good web sites on ...
  1. #1
    Linux Enthusiast gerard4143's Avatar
    Join Date
    Dec 2007
    Location
    Canada, Prince Edward Island
    Posts
    714

    Gnu Assembler Question

    Is the opcode leal(load effective address) primarly used to calculated the address of
    a value that was pushed on the stack?

    If anyone knows of any good web sites on this topic could you pass it on to me.

    Thanks in advance....Gerard4143

  2. #2
    Linux Engineer wje_lf's Avatar
    Join Date
    Sep 2007
    Location
    Mariposa
    Posts
    1,192
    Go here and search the page for the word "tutorial".

    Hope this helps.
    --
    Bill

    Old age and treachery will overcome youth and skill.

  3. #3
    Linux Newbie
    Join Date
    Jan 2008
    Location
    UK
    Posts
    211

  4. #4
    Linux Enthusiast gerard4143's Avatar
    Join Date
    Dec 2007
    Location
    Canada, Prince Edward Island
    Posts
    714

    My understanding of leal

    So if I understand the reference materials leal returns the address of a label or memory reference.

  5. #5
    Linux Engineer wje_lf's Avatar
    Join Date
    Sep 2007
    Location
    Mariposa
    Posts
    1,192
    I've never coded in x86 assembler, but that is my impression, yes. Play with it and see what happens. Use gdb. Grab gas & gdb with great gusto.
    --
    Bill

    Old age and treachery will overcome youth and skill.

  6. #6
    Linux Enthusiast
    Join Date
    Aug 2006
    Posts
    631
    With the lea instruction you can store an address (pointer) of a memory location (variable) into a register.
    It's used to do calculations on without affecting any flags, or the need of pushing and popping flags and it's also used in repetitve tasks.

    Regards

  7. #7
    Linux Enthusiast gerard4143's Avatar
    Join Date
    Dec 2007
    Location
    Canada, Prince Edward Island
    Posts
    714
    GDB with great gusto

    read "Using GNU's GDB debugger by Peter Jay Salzman"

    everyone should read this web sight great intro to the GDB...Gerard4143

  8. #8
    Linux Engineer wje_lf's Avatar
    Join Date
    Sep 2007
    Location
    Mariposa
    Posts
    1,192
    I'm sure that gerard4143 meant to include the link. Here's the link. I've just glanced over that tutorial, and it seems fine. It doesn't seem to address his original concerns about using the assembler. The links provided previously by wowbag1 and me will do that.
    --
    Bill

    Old age and treachery will overcome youth and skill.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
...