I'm solving a school assignment and so far everything has been quite simple. However, I encountered the following piece of code:
mov 0x8(%ebp), %eax ;load pointer function argument into eax
mov (%eax), %eax ;dereference the pointer
test %eax, %eax ;
sete %dl ;test if it was 0
lea 0x1(%eax), %ecx ;???
mov 0x8(%ebp), %eax ;load the argument again
mov %ecx, (%eax) ;store whatever is in ecx on the pointed-to address
...
I'm really at my wit's end here, does the register have an address? Way I see it, the lea would store the address of eax (offset by 1) into ecx, but that doesn't make sense, does it?