Mail Archives: djgpp/1999/09/17/08:02:42
Hi all,
I think u chaps must've seen my posting about rep stosb causing a
gpf(General protection fault) at that very instruction every time.Well I
sorta think I found a bug in libc.In my C program that was calling the
asm procedures had 2 lines like this
printf("Enter which gmode: ");
scanf("%d",&mode);
followed by-
InitMode();
InitGraphics();
Drawline(); <- just a test proc that uses rep stosb for drawing
when those two printf & scanf are there the instruction sub edi,edi or any
other instruction using ei seems to go ignored & edi ends up with a value
of 000010000 when the linit of the segment is 000000ffff obviously causing
a gpf.The code runs fine when i add a mode = 0x0013 and comment out the
printf & scanf ??? So what's the problem here?Is it a bug in DJGPP or libc
or what.
Have any of u run into the same problems before.? Mind if this's got
something thing to do with an incompatibiity problem between mode 13h &
printf/scanf I'm doing the mode sets after I call printf & scanf to' I
don't see how it is posible.
Pls therefore gurus enlighten me on this aspect.
Santosh
******************************************************************
Santosh .H :
Activities Linux Linux and only Linux :-)
Thought for a lifetime:
Only Wimps use MS windows
Toughs use Linux:-)
******************************************************************
- Raw text -