Mail Archives: djgpp/1997/04/09/06:57:55
On Tue, 8 Apr 1997, Peter Steele wrote:
> r.x.dx = (__tb & 0x000fffff) & 0xffff;
> r.x.es = (__tb & 0x000fffff) & 0xffff0000 >>4;
This is incorrect and also unnecessarily complicated. Just say so:
r.x.dx = __tb & 0xf;
r.x.es = (__tb >> 4) & 0xffff;
I didn't test your program after this correction, so I cannot
guarantee that this is the only problem. But it corrects at least one
error in your code which shifts left 0xffff0000 instead of __tb,
because the precedence of the >> operator is higher than that of &.
- Raw text -