Skip to main content
GameDev.net gamedev.net
🔒 Locked

Bizarre Assembler Behaviour?

Started by _psi Nov 29, 2004 at 6:59 AM 0 replies 500+ views
Original Post
_psi
_psi
Hello, just wondering if anyone could help me with this - i dont understand at all whats going on : the following code prepeares some stuff in eax and then writes it to my local memory space, which i've set up to be accessed using ebp so straight from the debugger: 00532067 03 45 20 add eax,dword ptr [ebp+20h] 0053206A 03 45 34 add eax,dword ptr [ebp+34h] 0053206D 89 85 94 00 00 00 mov dword ptr [ebp+94h],eax 00532073 89 85 94 00 00 00 mov dword ptr [ebp+94h],eax 00532079 89 85 94 00 00 00 mov dword ptr [ebp+94h],eax the strange thing is that the first mov instruction writes eax to a *different* memory location (actually ebp+EAh) then the second (and third) one, which do it right (write to ebp+94h) Does anyone know what's going on ?? Cheers, Mike
Winograd
Winograd
Two possibilities (as I can think of):

a) EBP changes without any visible reason :)
b) You manage to write to your code section at some point.
Probably stack or buffer overflow.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.