The 3-byte CHS adresses are encoded as follows: The first byte contains h, the head number, a value in the range 0-255. The second byte contains in its last six bits s, the sector number, a value in the range 1-63. The high order two bits of the second byte, followed by the eight bits of the third byte form c, the cylinder number, a value in the range 0-1023. In C-like code:
h = byte1;
s = byte2 & 0x3f;
c = ((byte2 & 0xc0) << 2) + byte3;
For a disk with C cylinders, H heads, and S sectors per track, the linear address corresponding to a CHS address (c,h,s) is found as c*H*S + h*S + s - 1. [Since CHS addresses have 24 bits only, they cannot address more than 2^24 sectors, which is insufficient for modern disks. Moreover, it is often unclear what values should be used for C, H, S. Thus, these CHS addresses should be ignored.]
i taj me dio zanima ali samo ovaj treci dio za cilindre ne kuzim kak se racuna...