what's the differ between lea and mov offset ?

From: Amr Mostafa (amrgo_at_hotmail.com)
Date: 01/19/04


Date: Mon, 19 Jan 2004 18:55:56 +0000 (UTC)

Greetings all,

a beginner is here ! :)

I want to know what's the difference between using :

1- lea dx,string
2- mov dx,offset string

I'm confused! as I think both of them gets 'string' address in memory
and puts it in dx

thanks for help!

regards,
amr



Relevant Pages

  • Re: whats the differ between lea and mov offset ?
    ... > 1- lea dx,string ... as I think both of them gets 'string' address in memory ... The mov instruction in this case is identical, ...
    (comp.lang.asm.x86)
  • Re: whats the differ between lea and mov offset ?
    ... as I think both of them gets 'string' address in memory ... MOV alternative, hence the offset must be available for computation at ... the LEA alternative must be used since ...
    (comp.lang.asm.x86)
  • Re: whats the differ between lea and mov offset ?
    ... Amr Mostafa wrote: ... > 2- mov dx,offset string ... as I think both of them gets 'string' address in memory ... LEA is longer, on older processor could be slower, but I'm not sure ...
    (comp.lang.asm.x86)
  • Re: Nasm 0.99.01 available
    ... relatively simple string processing code, and POST variables are sent through ... mov esi,env_names ... call puts ... ;;; strcmp Compares a NULL terminated string at esi to one at edi ...
    (alt.lang.asm)
  • Re: MASM Expert needed immediately
    ... let's just follow the code flow through your disassembler and see ... EDI points at the location where you want to store the string. ... On B$OperandSizeOverride = &TRUE, mov W$DisSizeMarker 'W$' ... mov eax D$LibFileMemory | add eax D$LibFileLength ...
    (alt.lang.asm)