In Visual Studio, I wrote:
mov eax, [edx][ebx][ecx][edi]
But it assembles just fine.
Why it is not invalid effective address?
In Visual Studio, I wrote:
mov eax, [edx][ebx][ecx][edi]
But it assembles just fine.
Why it is not invalid effective address?
It appears to be a bug in more recent versions of MASM.
Using the following file as an example:
.586
_TEXT SEGMENT USE32
mov eax, [edx][ebx][ecx][edi]
_TEXT ENDS
END
With MASM 6.11d this generates the following error:
t213a.asm(4) : error A2030: multiple index registers not allowed
With MASM 8.00.50727.42 or more recent there's no error, and the statement assembles to:
00000000: 8B 04 0F mov eax,dword ptr [edi+ecx]
So [edx][ebx][ecx][edi]
is not a valid addressing mode. A bug in the version of MASM you're using is accepting it when it should be rejecting it as an error.
© 2022 - 2024 — McMap. All rights reserved.
mov eax, [edx][ebx][ecx][edi]
to do? – Unbosom