N/APosted on - 07/30/2011
In data part of MBR, 66 bytes are used to represent the four different partitions in the chunks of 16 bytes each. In each chunk of 16 bytes 3rd and 4th bytes are used to hold the information about cylinder No. Write the C statements to calculate the information about cylinder No from these two bytes.
C statements to calculate the information about cylinder
You can check this material i hope this will be helpful for you
Unsigned int temp = 0 ;
Unsignedint StartCylinderNo = 0;
temp = ThirdByte;
temp = temp << 2 ; // shift bit # 6 & 7 in higher byte.
StartCylinderNo = FourthByte;
* ( ( (unsigned char *) (& StartCylinderNo) ) + 1 ) = * ( ( (unsigned char *) (& temp) ) + 1 ) ;