Re: EBP going crazy



On Mon, 15 Aug 2005 16:29:14 +0000 (UTC), André Kempe
<spamtrap@xxxxxxxxxx> wrote:
> Hi Folks,
>
> I have the following problem:
>
> My situation is to have a class A, which has a member of class type B.
>
> Member-function a of class A calls b of class B, where b implements some
> inline assembler, and stores the following registers
>
> push ebx
> push esi
> push edi
> push ebp
> push ecx
>
> and at the end restores them via
>
> pop ecx
> pop ebp
> pop edi
> pop esi
> pop ebx
>
> emms ; // reset fp-registers
>
> Before I call b, ebp is set to 0x0012490 after returning it is set to
> 0x15151912!
>
> I'm using VC 6.0. Does anyone know why upon return the ebp register
> contains that ...?
>
Something must be writing into the stack. Care to post the inline asm
code?


--
BOFH excuse #426:

internet is needed to catch the etherbunny

.



Relevant Pages

  • Re: EBP going crazy
    ... >My situation is to have a class A, which has a member of class type B. ... >push ebx ... the "pop ebp" ...
    (comp.lang.asm.x86)
  • Re: EBP going crazy
    ... > My situation is to have a class A, which has a member of class type B. ... > push ebx ... > push ebp ... > push ecx ...
    (comp.lang.asm.x86)
  • EBP going crazy
    ... push ebx ... push ebp ...
    (comp.lang.asm.x86)
  • Re: Having Trouble with File I/O (win32 API) -- Using NASM and ALINK
    ... push param3 ... I don't think you have to) As Wolfgang points out, using ebp as a "stack frame pointer" is optional. ... thought a string is basically a pointer that is dword in length. ... push dword ...
    (comp.lang.asm.x86)
  • Re: old skool vc++ 1.0
    ... right-to-left order, a CALL is executed, and upon return from the CALL, the stack pointer ... int f ... mov ebp, esp ...
    (microsoft.public.vc.mfc)