www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1999/01/10/06:40:07

Date: Sun, 10 Jan 1999 13:38:51 +0200 (IST)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
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: <Pine.SUN.3.91.990110133807.20678W-100000@is>
MIME-Version: 1.0
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, &regs);
>   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 -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019