#include
"iostream.h"
#include
"stdio.h"
#include
"dos.h"
main()
{
//AIM
:to low leval read from disk using BIOS
union REGS i,o;
// int ii;
struct SREGS s;
char far (buf[9999]);
int dno,tno,sno,nno,hno;
cout<<"\n Enter drive no :
";
cin>>dno;
cout<<"\n Enter track no :
";
cin>>tno;
cout<<"\n Enter sector no :
";
cin>>sno;
cout<<"\n Enter head no :
";
cin>>hno;
cout<<"\n Enter no of sectors
to be read : ";
cin>>nno;
i.h.ah=2;
i.h.dh=hno;
i.h.cl=sno;
i.h.ch=tno;
i.h.al=nno;
i.h.dl=dno;
s.es=FP_SEG(buf);
i.x.bx=FP_OFF(buf);
int86x(19,&i,&o,&s);
if(o.x.cflag==0)
{
cout<<"\nNumber
of sectors actually read : ";
printf("%d\n",o.h.al);
cout<<"\n
Matter Read : ";
nno*=512;
cout<<"\nmatter
read :"<<buf;
//for(ii=0;ii<=nno;cout<<buf,);
}
else
cout<<"\nSectors
not read";
return 0;
}