error A2070: invalid instruction operands

后端 未结 2 2045
自闭症患者
自闭症患者 2020-12-02 01:36

the error is in AfterLoop skope in the line \" mov [esi], [edi]\" . how can I resolve this issue? ; The function for node removing (headptr, nodeToremove)

re         


        
2条回答
  •  温柔的废话
    2020-12-02 02:16

    mem, mem is not a valid combination of operands. Use a register as an intermediate, e.g.:

    mov eax,[edi]
    mov [esi],eax
    

    Alternatively, if you can swap esi and edi you could use movsd:

    movsd        ; dword [edi] = dword [esi]; esi += 4; edi += 4
    

    (Note: the += 4 is true assuming that the direction flag is clear. Otherwise it will be -= 4. Shouldn't matter in your case since you pop esi and edi immediatly afterwards).

提交回复
热议问题