Invalid effective address - subtracting two registers

101 Views Asked by At
        mov edi, 4
    mov ecx, 10
    read:
        lea eax, [ebp-edi] ;error line
        push eax
        
        
        call readVal
        add edi, 4
    loop read

        add esp, 40

I am trying to allocate an array of 10 elements of a local variable in a function. I keep getting invalid effective address.

0

There are 0 best solutions below