Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

hi im trying to use the interrup

Status
Not open for further replies.

dhiva007

Programmer
Jan 21, 2002
3
IN
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!!!

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top