www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1999/04/21/13:45:50

From: "Sacha Guyon" <sachman AT multimania DOT com>
Newsgroups: comp.os.msdos.djgpp
Subject: translation of an MSCDEX Real mode function into djgpp and dpmi's Pmode ?
Date: Wed, 21 Apr 1999 17:21:46 +0200
Organization: Club-Internet (France)
Lines: 31
Message-ID: <7fkqpp$fo4$2@front6.grolier.fr>
NNTP-Posting-Host: ppp-170-160.villette.club-internet.fr
Mime-Version: 1.0
X-Trace: front6.grolier.fr 924708473 16132 195.36.170.160 (21 Apr 1999 15:27:53 GMT)
NNTP-Posting-Date: 21 Apr 1999 15:27:53 GMT
X-Newsreader: Microsoft Outlook Express 4.72.3110.5
X-MimeOLE: Produced By Microsoft MimeOLE V4.72.3110.3
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

I have a problem to translate a real mode function to djgpp and dmpi's
protected mode laws.

I need to use the "MSCDEX Send Device Driver Request" function from int
2Fh, with ax = 1510h, cx = cdrom letter [i have a variable CDROM
containing this number] , and [here is my problem] es:bx = adress of cdrom
device driver request header.
I need to know the real mode equivalent segment and offset of ptr , and i
didn't find it in the dpmi specs and djgpp docs.

so here is the real mode function :

void CallDevice(void *ptr)
{
  static union REGS reg;
  static struct SREGS seg;

  segread(&seg);
  seg.es=FP_SEG(ptr);
  reg.x.ax=0x1510;
  reg.x.bx=FP_OFF(ptr);
  reg.x.cx=CDROM;
  int86x(0x2f, &reg, &reg, &seg);
}


Thanx,
--
Sacha - ICQ# : 14348724
<http://www.multimania.com/sachman>

- Raw text -


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