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!

get drive parameter

Status
Not open for further replies.

dhiva007

Programmer
Jan 21, 2002
3
IN
hai,
i have written the 'c' code to access the drive parameters using fn 48h.But the buffer is filled with 0s.What is the problem with the code.
struct x13
{
unsigned int length;
unsigned int flag;
unsigned long int cyl;
unsigned long int head;
unsigned long int secptrc;
unsigned long int tsec[2];
unsigned int bps;
}bpb;
struct x13 far *bpb1=(struct x13 far *)&bpb;
#include<dos.h>
main()
{
clrscr();
_DS=FP_SEG(bpb1);
_SI=FP_OFF(bpb1);
_AH=0x48;
_DL=0x80;
geninterrupt(0x13);
printf(&quot;bps=%lu&quot;,bpb1->cyl);
getch();
}


 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top