I could end my post there but that's not very informative.
Right, I was looking at the stack trace window, trying to find out where PB stores a procedure's local variables... the manual doesn't have much to say about it... and I found that in between the procedure's arguments, and the local variables, there was another 32 bit value that I didn't know what it was...
Does anyone know?
Can I rely on it being there all the time? Did I dream this?
PS I thought it might be a saved EBP but since PB uses ESP to reference stack variables, it wouldn't need to save EBP would it?
... the manual doesn't have much to say about it...
Why should it, it's really an internal matter? Anyhow, the first thing PB does in a procedure is push the EBX register, to be popped at procedure's end.
I may look like a mule, but I'm not a complete ass.
veganisafreak wrote:Right, I was looking at the stack trace window, trying to find out where PB stores a procedure's local variables... the manual doesn't have much to say about it... and I found that in between the procedure's arguments, and the local variables, there was another 32 bit value that I didn't know what it was...
Return address?
If you paint your butt blue and glue the hole shut you just themed your ass but lost the functionality.
(WinXPhSP3 PB5.20b14)
Just compile your code with the /commented switch from a console and you can look
at the assembly code to see what is done exacly when calling the procedure.
... the manual doesn't have much to say about it...
Why should it, it's really an internal matter? Anyhow, the first thing PB does in a procedure is push the EBX register, to be popped at procedure's end.
This sunk in over the last couple days. I can't believe I referred to the return address as a mysterious item. What an idiot. I assumed the return address would be higher up the stack somewhere...
I guess PB pushes the ReturnAdr first and then the Parameters,
because the Params need to be popped in the beginning of the procedure,
but the ReturnAdr only at the end....