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("bps=%lu",bpb1->cyl);
getch();
}
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("bps=%lu",bpb1->cyl);
getch();
}