Mail Archives: djgpp/1997/10/07/00:17:25
On Mon, 6 Oct 1997, Sam Davies wrote:
> I know that this error is actually a result of calling my routine, since
> I can comment out the call to the function, and there's no problem...
> So I'm assuming it must be that I messed up within the routine... I
> modify SI, DI, BP, and DS, but I push and pop all these at the beginning
> and end... Is there anything else that I could be screwing up in my
> routine that is causing this strange behavior? I don't have to save the
> other general registers, do I?
I'm just curious: are you saving the extended 32-bit registers as well?
Even if you only use the 16-bit registers, you should save and restore the
extended ones. Your stack frame should look similar to this:
push ebp
mov ebp, esp
push ds
push edi
push esi
[program]
pop esi
pop edi
pop ds
mov esp, ebp
pop ebp
/\/\att /\/\astracci mmastrac AT acs DOT ucalgary DOT ca
GCS/GE d- s+:+ a--- C++++ UA P+ L E-- W+ N++ o K+ w+ O M- V
PS++ PE++ Y+ PGP t+++ 5+++ X++ R++ tv+ b+++ DI++++ I
G++ e h r* z?
- Raw text -