delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1996/12/20/04:26:52

From: killion AT ro DOT com (Killion)
Newsgroups: comp.os.msdos.djgpp
Subject: Calling int 2Fh with DJGPP
Date: Fri, 20 Dec 1996 08:11:00 GMT
Organization: RENAISSANCE INTERNET SERVICES
Lines: 37
Message-ID: <32ba45e0.1085361@news.ro.com>
Reply-To: killion AT ro DOT com
NNTP-Posting-Host: ts2p10.ro.com
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

I'm trying to port C source code to use with DJGPP. This code accesses
INT 2Fh (the multiplexer, I believe) to communicate with the CD-ROM
drive. 

Unfortunatly, INT86 and INT86X do not seem to support this call (If I
recall corectly, it supports INT21h and other non-pointer-passing
calls). I don't know enough about GAS or protected mode to write my
own workaround. Does anyone have any suggestions? (Here's the
troublesome code, in case it's another problem.)


/* Original real mode code calling INT2Fh */

void device_request (void *block)
{
  inregs.x.ax = 0x1510;
  inregs.x.cx = cdrom_data.first_drive;
  inregs.x.bx = FP_OFF (block);
  sregs.es = FP_SEG (block);
  int86x (0x2f, &inregs, &outregs, &sregs);
}

/* Modified yet still unfunctional source code */

void device_request (BYTE *block)
{
  inregs.w.ax = 0x1510;
  inregs.w.cx = cdrom_data.first_drive;
  inregs.w.bx = *block;
  int86 (0x2f, &inregs, &outregs);
}



Thanks in advanced. 
Killion

- Raw text -


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