assembly - 为什么 Visual Studio 组装 mov eax, [edx][ebx][ecx][edi] 没有提示?

标签 assembly x86 masm

在 Visual Studio 中,我写道:

mov eax, [edx][ebx][ecx][edi]

但它组装得很好。

为什么不是无效的有效地址?

最佳答案

这似乎是最近版本的 MASM 中的一个错误。

使用以下文件作为示例:

    .586

_TEXT   SEGMENT USE32
    mov eax, [edx][ebx][ecx][edi]
_TEXT   ENDS
    END

使用 MASM 6.11d 这会生成以下错误:
t213a.asm(4) : error A2030: multiple index registers not allowed

使用 MASM 8.00.50727.42 或更新版本没有错误,并且语句汇编为:
00000000: 8B 04 0F           mov         eax,dword ptr [edi+ecx]

所以[edx][ebx][ecx][edi]不是有效的寻址模式。您正在使用的 MASM 版本中的一个错误是在它应该拒绝它作为错误时接受它。

关于assembly - 为什么 Visual Studio 组装 mov eax, [edx][ebx][ecx][edi] 没有提示?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/33596266/

相关文章:

c - 如何在汇编中将数组中特定点的值存储到寄存器,反之亦然

assembly - 为什么在 x86 汇编中 left 会执行 "mov esp,ebp"?

assembly - 堆栈中的返回地址是如何指定的?

arrays - 更改 edi 的偏移量与更改地址处的值?

visual-studio - 是否可以使用 Visual Studio 编写 intel 程序集?

assembly - STP 中的寄存器存储顺序

c++ - x86 4 字节 float 与 8 字节 double (与 long long 相比)?

floating-point - fabs(double)如何在x86上实现?这是一项昂贵的手术吗?

assembly - 汇编 x86 中整数之间的除法

macos - 为 Mac OS X 运行汇编代码