[A89] Re: help understanding this code
[Prev][Next][Index][Thread]
[A89] Re: help understanding this code
> >The second line pushes 3840 (as a number)
>>to the stack, increasing sp by 4
>
>The stack grows downward, so it decreases sp by 4.
>
>>the last line pushes the current sp address
>>plus 8 bytes, that is, the address that was loaded in the first line.
>
>That is correct. Wonder why you got this one right if you thought the stack
>was growing upward.
mmm, a typo?... ^_^
> >All this are passed as arguments to memcpy. So... Would this also
> >work?
>
>No, since you don't reserve any memory on the stack. This means that the
>arguments to memcpy will be in the area which is to be copied to, and
>memcpy's internal stuff will also happen in this area.
>
>Sebastian Reichelt
ok, I got it. Thanks a lot,
ra.-
References: