From: Seyil Yoon Newsgroups: comp.os.msdos.djgpp Subject: Newbie to DJGPP2.01 from BC5.02 struggling with int13h stuff. Date: Fri, 09 Oct 1998 14:07:38 -0400 Organization: UUNET Canada News Transport Lines: 102 Message-ID: <361E50EA.42398FCE@interlog.com> NNTP-Posting-Host: 209.47.85.27 Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="------------63CDFBB40F4BA860D9604662" X-Mailer: Mozilla 4.06 [en] (Win98; U) To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com --------------63CDFBB40F4BA860D9604662 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Having previously worked in BC5.02, there are a bunch of issues that I never had to deal with that I now do because of DJGPP2.01. In BC5.02, here is what I would have written: void Int13Read( unsigned char ucDrive, unsigned short usCyl, unsigned char ucHead, unsigned char ucSect, unsigned char ucSectorsToRead, far char * fpcBuffer) { union REGS InRegs; union REGS OutRegs; struct SREGS SegRegs; unsigned char ucSectorMask; ucSectorMask = (unsigned char) (usCyl >> 2); ucSectorMask |= ucSect; InRegs.h.ah = 2; InRegs.h.al = ucSectorsToRead; InRegs.h.ch = (unsigned char) usCyl; InRegs.h.cl = ucSectorMask; InRegs.h.dh = ucHead; InRegs.h.dl = ucDrive; SegRegs.es = FP_SEG(fpcBuffer); InRegs.x.bx = FP_OFF(fpcBuffer); int86x(0x13, &InRegs, &OutRegs, &SegRegs); } In DJGPP2.01, I realize that int86() will not work in this case (since int13h/ah=2 is not on the list of "supported" functions). But after reading the FAQ and the help, I am not sure how exactly I should be tackling this. I have the feeling it has to do with __dpmi_regs, __dpmi_int, and some other stuff which I don't understand completely. Any help would be greatly appreciated. Seyil Yoon (wings AT datarec DOT com) Research Programmer, Data Recovery Labs (http://www.datarec.com) P.S. Thanks to all who answered my question regarding namespaces. --------------63CDFBB40F4BA860D9604662 Content-Type: text/html; charset=us-ascii Content-Transfer-Encoding: 7bit Having previously worked in BC5.02, there are a bunch of issues
that I never had to deal with that I now do because of DJGPP2.01.

In BC5.02, here is what I would have written:

void
Int13Read( unsigned char  ucDrive,
           unsigned short usCyl,
           unsigned char  ucHead,
           unsigned char  ucSect,
           unsigned char  ucSectorsToRead,
           far char *     fpcBuffer)
{
    union REGS   InRegs;
    union REGS   OutRegs;
    struct SREGS SegRegs;

    unsigned char ucSectorMask;

    ucSectorMask = (unsigned char) (usCyl >> 2);
    ucSectorMask |= ucSect;

    InRegs.h.ah = 2;
    InRegs.h.al = ucSectorsToRead;
    InRegs.h.ch = (unsigned char) usCyl;
    InRegs.h.cl = ucSectorMask;
    InRegs.h.dh = ucHead;
    InRegs.h.dl = ucDrive;
    SegRegs.es  = FP_SEG(fpcBuffer);
    InRegs.x.bx = FP_OFF(fpcBuffer);

    int86x(0x13, &InRegs, &OutRegs, &SegRegs);
}

In DJGPP2.01, I realize that int86() will not work in this case
(since int13h/ah=2 is not on the list of "supported" functions).
But after reading the FAQ and the help, I am not sure how exactly
I should be tackling this. I have the feeling it has to do with __dpmi_regs,
__dpmi_int, and some other stuff which I don't understand completely.
Any help would be greatly appreciated.

Seyil Yoon (wings AT datarec DOT com)
Research Programmer, Data Recovery Labs (http://www.datarec.com)

P.S. Thanks to all who answered my question  regarding namespaces. --------------63CDFBB40F4BA860D9604662--