/// Show the Status \\\
gotoxy(10,10); printf("Reading Data from: Head=%d
Track=%d Sector=%d",
head, track, sector);
fprintf(tt,"\n Data read from: Head=%d Track=%d Sector=%d\n",
head, track, sector);
/// Read the Specified Sectors \\\
result = _bios_disk(_DISK_READ, &dinfo);
/// Store the contents in the Specified file \\\
if ((result & 0xff00) == 0)
{
for(i=0;i<512;i++)
fprintf(tt,"%c",dbuf[i] & 0xff);
}
/* Print Error message on screen and in file for Error
while Reading a sector */
else
{
printf("\n Can not read at Head= %d Track= %d
Sector= %d\n",head,track,sector);
fprintf(tt,"\n Can not read at Head= %d Track= %d
Sector =%d\n",head,track,sector);
}
}
}
}
fclose(tt);
}
|