From: "Marp" Newsgroups: comp.os.msdos.djgpp Subject: Need help rewriting code... Date: Wed, 6 Jan 1999 22:33:30 -0500 Organization: ICGNetcom Lines: 21 Message-ID: <7719uh$ngv@sjx-ixn10.ix.netcom.com> NNTP-Posting-Host: prn-nj1-21.ix.netcom.com X-NETCOM-Date: Wed Jan 06 7:33:37 PM PST 1999 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 piece of code (posted below) that I want to convert to work with DJGPP. I read section 18.2 of the FAQ but I didn't really understand it completely so could someone tell me the DJGPP equivalent for this code: 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, ®, ®, &seg); } Please post your reply to the newsgroup. My e-mail address is fake to avoid spam.