Mail Archives: djgpp/1994/10/09/18:03:32
Replying to a message from 2 weeks ago:
> In the file dosmem.s in libsrc/c/dos gas produces for the jcxz zero
> instructions code for a jump with 16 bit displacements. This will mask
> the high word of EIP, so (when cx is zero) it will jump from say
> 0x00012345 to 0x00002347 instead of the correct 0x00012347. In the
> gas manual, there is mentioned, that using jcxz may be risky, but I
> really don't understand what they mean. The code should get assembled
> correctly (with 8-bit displacement, "short" jump). The following
> patch seems to fix the problem (using jz instead of jcxz).
I just looked at some of my code with the debugger. The two jcxz
instructions in dosmem.s seem to be assembled with 8-bit displacements in the
standard distribution, not 16-bit. Did you rebuild the library, and if so,
did you use a different version of gas than DJ uses?
- Raw text -