/* If total no. of hard disks attached is less
than two Display Error Message and Exit. */
if(((char)peekb(0x0040, 0x0075))<2)
{
printf("\n\n You Must Have At least Two Hard Disks
Attached to your Computer To Run This");
printf("\n Program. Press any Key to Exit... ");
getch();
exit(1);
}
/// Get parameters of First Hard Disk (0x80) \\\
Sectors_in_HDD1 = getdrivegeometry (0x80);
printf(" Total Sectors in First Hard Disk = %lu\n\n",
Sectors_in_HDD1)
/// Get Parameters of Second Hsrd Disk (0x81) \\\
Sectors_in_HDD2 = getdrivegeometry (0x81);
printf(" Total Sectors in Second Hard Disk = %lu\n\n",
Sectors_in_HDD2);
/// First Confirm, Then Proceed \\\
printf("\n All The Data in Second Hard Disk will be
lost !!!");
printf("\n Press \'Y\' to Continue, Else any key to
Exit... ");
choice = getche();
switch(choice)
{
case 'y':
case 'Y':
break;
default:
exit(0);
}
|