【发布时间】:2012-08-06 03:16:18
【问题描述】:
在以下代码中,rEDX, rEBX, rEBP, rESI and rEDI 是结构 scratch_space 的成员。 scratch_space_arg 是结构 scratch_space 的对象。
lea eax, scratch_space_arg
mov [ecx+[eax].rEDX], edx
mov [ecx+[eax].rEBX], ebx
mov [ecx+[eax].rEBP], ebp
mov [ecx+[eax].rESI], esi
mov [ecx+[eax].rEDI], edi
这段代码给了我一个:
error C2426: '[' : illegal operator in 'first operand'
对于所有mov 语句。知道如何解决这个问题吗?
PS:我使用this article 访问struct 成员。
【问题讨论】:
-
你试过
[ecx+eax].rEDX吗?
标签: c++ c inline-assembly masm