hi
im trying to use the interrupt 13h extension functions (like service no. 42,...,48h). i wrote a function like this:
int extread(int driveno,long
absblock,unsigned int nsec)
{
int *si;
char drive;
buf.size=0x10;
buf.nblock=nsec;
buf.buffer=(void far *)buffer;
buf.block[1]=0;
buf.block[0]=absblock;
drive=(char)driveno;
_DL=drive;
_DS=FP_SEG(&buf);
_SI=FP_OFF(&buf);
_AH=0x42;
geninterrupt(0x13);
flag=_AH;
}
where buf is a structure variable:
struct diskpacket
{
char size;
char reserv;
unsigned int nblock;
unsigned far *buffer;
long int block[2];
}buf;
on executing, i got an error code in AH (=01). what could b the possible error. plz suggest where i may b wrong.
note : i got the interrupt list from "Interrupt List by Ralf Brown".
i'll vote 4 every helpful tip. its very urgent. plz help!!!
im trying to use the interrupt 13h extension functions (like service no. 42,...,48h). i wrote a function like this:
int extread(int driveno,long
absblock,unsigned int nsec)
{
int *si;
char drive;
buf.size=0x10;
buf.nblock=nsec;
buf.buffer=(void far *)buffer;
buf.block[1]=0;
buf.block[0]=absblock;
drive=(char)driveno;
_DL=drive;
_DS=FP_SEG(&buf);
_SI=FP_OFF(&buf);
_AH=0x42;
geninterrupt(0x13);
flag=_AH;
}
where buf is a structure variable:
struct diskpacket
{
char size;
char reserv;
unsigned int nblock;
unsigned far *buffer;
long int block[2];
}buf;
on executing, i got an error code in AH (=01). what could b the possible error. plz suggest where i may b wrong.
note : i got the interrupt list from "Interrupt List by Ralf Brown".
i'll vote 4 every helpful tip. its very urgent. plz help!!!