Date: Sun, 10 Jan 1999 13:38:51 +0200 (IST) From: Eli Zaretskii X-Sender: eliz AT is To: djgpp AT delorie DOT com Subject: Re: What did I do wrong? In-Reply-To: <77685n$o14@sjx-ixn6.ix.netcom.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Reply-To: djgpp AT delorie DOT com 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.