Sector Skewing

Skewing is the rearrangement of sectors on a disc, so that by the time the computer has read and processed one sector, the next will be in the right position for the disc controller to read. Otherwise the poor controller has to wait for the disc to make a full revolution before the right sector appears.

There are two types of skewing - software and hardware.

Hardware skewing

In this system, when the disc is formatted the sectors are laid out in the required order - for example 1, 4, 7, 2, 5, 8, 3, 6, 9. The retrieval of the correct sector is handled transparently by the disc controller and no special code is needed to handle such discs.

Software skewing

In this system, the disc is formatted with the sectors in numeric order - for example 1, 2, 3, 4, 5, 6, 7, 8, 9. However, the software which reads/writes the disc has a translation table which it uses whenever supplying sector numbers to the controller - this might read 1, 3, 5, 7, 9, 2, 4, 6, 8 - so if a program writes to what it thinks is the sixth sector of a track, this is translated to sector number 2.

The problem with software skewing comes when another computer wants to read the discs created by the first. Unless the contents of the translation table are available, the information on the tracks will appear to be hopelessly jumbled up.

Under CP/M 1, the skewing is fixed for its 8" discs. The table reads: 1,7,13,19,25,5,11,17,23,3,9,15,21,2,8,14,20,26,6,12,18,24,4,10,16,22

Under CP/M 2 and later, software skewing is handled by the SECTRAN system call. SECTRAN requires the address of a translation table; see the description of the Disk Parameter Header to find the address of this table.

Back to the formats listing

Back to the CP/M archive list