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.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
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
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.