Date: Sun, 9 Oct 94 15:47:54 EDT From: peprbv AT cfa0 DOT harvard DOT edu (Bob Babcock) To: buers AT DG1 DOT CHEMIE DOT UNI-KONSTANZ DOT DE Cc: djgpp AT sun DOT soe DOT clarkson DOT edu Subject: Re: bug in movedata (or in gas), with fix Reply-To: babcock AT cfa DOT harvard DOT edu 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?