Menu

#77 Lea bug

open
nobody
None
5
2010-03-24
2010-03-24
Anonymous
No

I send you a mail describing it but you didint answer the bug is:

lea eax, dword ptr [0FFh]

i cant make this, while in ML yes and work perfect.

Thanks.

Discussion

  • Nobody/Anonymous

    I confirm this behavior. However, it's probably a Masm bug, because

    lea edx, 0FFh

    (variant without the dword ptr) is rejected even by Masm.

    I suggest to use

    lea edx, ds:0FFh

    instead. This is accepted by both Masm and JWasm and with this syntax the second argument is clearly marked to be an address.

    japheth

     
  • Diederik Huys

    Diederik Huys - 2012-02-23

    Also confirmed here.
    Defining a variable first followed by lea [variable] does work however.
    Defining a symbol with EQU or = gives obviously the same error as with numeric operand.

    AFAIK, MASM 6.x automatically codes LEA reg,[imm] as MOV reg,imm.

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.