x86 - Invalid effective address (assembly) -
the following code:
mov edx,dword[ecx+(5*ebx)]
gives me error of "invalid effective address".
far know, ok take content of (register1+ register2 multiplied constant). why getting error here?
full code:
section .text align 16 global main main: push ebp mov ebp, esp pushad mov ebx, 1 mov ecx, 2 mov edx,dword[ecx+(5*ebx)] popad ; restore registers mov esp, ebp ; function exit code pop ebp ret
Comments
Post a Comment