delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1999/01/09/06:39:02

Message-ID: <36973F6D.E2EED8B7@net4you.co.at>
Date: Sat, 09 Jan 1999 12:37:18 +0100
From: Seawolf <seawolf AT net4you DOT co DOT at>
X-Mailer: Mozilla 4.07 [de] (Win98; I)
MIME-Version: 1.0
To: djgpp AT delorie DOT com
Subject: Re: What did I do wrong?
References: <77685n$o14 AT sjx-ixn6 DOT ix DOT netcom DOT com>
Reply-To: djgpp AT delorie DOT com

> 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, &regs);
>   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 -


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