delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2000/08/24/00:01:37

Message-ID: <39A49367.AE2AB7BF@operamail.com>
From: Sahab Yazdani <sahaby AT operamail DOT com>
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: <sq8l1orht9193 AT corp DOT supernews DOT com>
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,&regs,&regs,&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/                      *
***********************************************************

- Raw text -


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