in the OS series, in http://www.brokenthorn.com/Resources/OSDev6.html, and in the comments in the downloadable source code, the following is written about converting an LBA address to a CHS one:
absolute sector = (logical sector / sectors per track) + 1
absolute head = (logical sector / sectors per track) MOD number of heads
absolute track = logical sector / (sectors per track * number of heads)
after spending 2 weeks trying to find out why my bootloader wasn't working, I found that the formula for Absolute Sector should be
absolute sector = (logical sector MOD sectors per track) + 1
The actual source code itself in the download is correct but the comment is the same as above.
The reason I got so stuck on this is because, rightly or wrongly, I dont copy source code - I try to write it myself so I fully understand what is going on (I still have much to learn about assembly).
Anyway, I hope you dont mind a constructive criticism.