Mail Archives: djgpp/1997/09/25/05:29:03
On Mon, 22 Sep 1997, Mitch Randall wrote:
> Does anyone have an example code snippet of a call to ASPI that's known
> to work? I've ported working code from Watcom to DJGPP. However,
> there is no response from the ASPI manager with the DJGPP version.
I cannot be sure without seeing the original Watcom code, but I think
the following is the source of your trouble:
> /* point real mode data structure to real mode entry point */
> regs.x.cs = aspientry >> 16;
> regs.x.ip = aspientry & 0xFFFF;
It should say instead this, I think:
regs.x.cs = aspientry >> 4;
regs.x.ip = aspientry & 0xF;
Real-mode addresses are formed by segment*16+offset. Multiplication
by 16 is equivalent to a shift by 4 bits, not 16.
- Raw text -