title: bootloader reading drive parameters
body: <p>I want to get dimensions of hard drive. I find that I need to use int 13h with ah = 08h. I found on <a href="https://en.wikipedia.org/wiki/INT_13H#INT_13h_AH.3D08h:_Read_Drive_Parameters" rel="nofollow">wikipedia</a> that it returns following:</p>
  
  <p>DH  logical last index of heads = number_of - 1 (because index starts with 0)</p>
  
  <p>CX  [7:6] [15:8] logical last index of cylinders = number_of - 1 (because index starts with 0)</p>
  
  <p>[5:0] logical last index of sectors per track = number_of (because index starts with 1)</p>
  
  <p>The problem is that I have no idea how to read only bits [5:0] on it own to get last index of sector per track, and the same with [7:6][15:8] to get last index of cylinders. I would be really thankful if someone would point me into the right way or explain how to do this.</p>