Mail Archives: djgpp/1999/01/09/06:39:02
> I rewrote it like this:
>
> void CallDevice(void *ptr)
> {
> __dpmi_regs regs;
>
> dosmemput(ptr,26,__tb);
> regs.x.es=__tb >> 4;
> regs.x.ax=0x1510;
> regs.x.bx=__tb & 0x0f;
> regs.x.cx=cdrom;
> __dpmi_int(0x2f, ®s);
> dosmemget(__tb,26,ptr);
> return;
> }
>
> but my program doesn't work. I'm pretty sure this function is the problem.
> (ptr points to a structure that's 26 bytes and I used
> __attribute__((packed)) and cdrom is a global int) So could someone tell me
> what I did wrong (if anything)? I apologize to Eli for not putting any
> effort into it the last time :)
Okay, use this:
offset - __tb & 0x0f
segment - (__tb >> 4) & 0xffff
- Raw text -