Message-ID: <39A49367.AE2AB7BF@operamail.com> From: Sahab Yazdani Organization: PheonixSoft Inc. X-Mailer: Mozilla 4.7 [en] (Win98; I) X-Accept-Language: en MIME-Version: 1.0 Newsgroups: comp.os.msdos.djgpp Subject: Re: Problem with interruption References: Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Lines: 34 Date: Wed, 23 Aug 2000 23:15:51 -0400 NNTP-Posting-Host: 149.99.15.145 X-Complaints-To: abuse AT sprint DOT ca X-Trace: newscontent-01.sprint.ca 967087422 149.99.15.145 (Wed, 23 Aug 2000 23:23:42 EDT) NNTP-Posting-Date: Wed, 23 Aug 2000 23:23:42 EDT To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com i'm no good at interrupts and stuff like that, but I can tell you right off the bat that this code will not work under DJGPP under any circumstances. The way you are doing it is just plain wrong for DJGPP. check out the function __dpmi_int in the help for a more detailed explainantion Curso wrote: > > I am trying to call this code in a function, but this give me a GPF. If i > put this code in main function, there is no problem. Why? Any one can help > me? > > char sector[512]; > regs.h.ah = 0x02; // read a sector from a disk > regs.h.dl = 0x00; // drive number > regs.h.al = 0x01; // number of sectors > regs.h.ch = k; // track 0 to 79 - max 80 > regs.h.cl = j; // sector 0 à 17 - max 18 > regs.h.dh = i; // head 0 e 1 - max 2 > regs.x.bx = (unsigned) sector; > sregs.es = _my_ds(); > > int86x(0x13,®s,®s,&sregs); > > TIA > cropalato AT svn DOT com DOT br -- *********************************************************** * Sahab Yazdani * "Remember, I'm the monkey and you're the* * Thornhill S.S * cheese grater. So no messing around." * *********************************************************** * http://pheonixsoft.virtualave.net/ * ***********************************************************