Mail Archives: djgpp/1999/01/10/06:40:07
On Fri, 8 Jan 1999, Marp wrote:
> 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.
This conversion seems okay to me. What exactly does not work when you
use this code?
Some things you might want to check:
1) how is the cdrom variable defined? what's its value?
2) does __dpmi_int return with the CARRY flag set? if it does,
the call failed for some reason.
Some additional gotchas in using real-mode services are listed in
section 18.5 of the FAQ. For example, you might be using int instead
of shorts for 16-bit integers.
> I apologize to Eli for not putting any effort into it the last time :)
If you still have any comments about what the FAQ explains on this
matter, I would really like to hear them.
- Raw text -