Orlando Llanes wrote:
Thank you!!! 8~) The dream of OOP <sniffle, wiping tear from eye> is
once again reality =B) BTW, I found that external assembly routines (I'm using NASM) allow one to use the EBP register as long as its value is preserved at the start of the routine and restored at the end. To reference the values on the stack, I used [ESP+8] for the first parameter, [ESP+n] for the next ones.
BTW, the compiler can access the values on the stack via ESP, too, if you give it the --omit-frame-pointer option. I'm not sure why this is not the default (at least when optimization is turned on), but the GCC developers surely have their reasons...
According to Frank Heckenbach:
BTW, the compiler can access the values on the stack via ESP, too, if you give it the --omit-frame-pointer option. I'm not sure why this is not the default (at least when optimization is turned on), but the GCC developers surely have their reasons...
It inhibits debugging and stack backtraces which are otherwise possible even with optimization turned on.
Peter