Scor­pio News


July–September 1987 – Volume 1. Issue 3.

Page 17 of 67

the file name is fairly complex and involves adding the characters into an 18 bit of partial result. Characters whose ASCII values are odd numbers are simply added in while even ones are right shifted first. The position of the character in the file name determines whether the partial result is left shifted none, one or two places after the addition.

The directory entry number for the file is calculated by dividing the absolute extent number by EXM+1 where EXM is the extent mask as defined in the disk parameter block. The absolute extent number is formed by joining the S2 and EXT bytes end to end to form an 11 bit number. (Under CP/M 3, there are 6 bits for the S2 byte and 5 bits for the EXT byte.) This number represents the highest extent number addressed by the current directory entry end falls in the range 0 to 2048 (2048 * 16K = 32Mbytes).

Considering the Gemini QDDS format for a moment, we know that each directory entry can control 4 extents. If we take the absolute extent number and divide this by 4, we will have calculated the directory entry number for the current entry.

All this is fine but why hash the directory entries of a disk at all? CP/M 3 maintains a table of hashed directory entries for each drive in the system. Each table is (DRM+1)*4 bytes long allowing four bytes per directory entry as previously stated. When CP/M 3 needs to access a directory entry for a file, it is a relatively simple matter to hash the file control block and search the hash table for a matching entry. Once this entry is found, its position in the hash table tells CP/M 3 precisely which physical disk sector contains the entry and enables it to directly access the wanted sector rather than having to sequentially read the disk directory from the start. Of course, if the wanted physical sector is already in a physical record buffer, this makes the process faster still.

HBANK refers to the memory bank containing the hash table for the associated drive.

That’s all again for this issue. The concluding part of this article will be in the next issue of Scorpio News.

Dealer Profile - Off Records

[Ed. – In our continuing series looking at the roots of various 80-BUS dealers, this issue it is the turn of Battersea based OFF Records.]

By the year 1975 computing on mainframes had become quite tedious. A single machine had to support so many users that it was impossible to do the more interesting experiments on them and computing centres had become bureaucratic empires which stifled all work other than the trivial and routine. People who have only worked on personal computers find it difficult to visualize the straight jacket imposed by a large time-shared machine. They are fine if you happen to be a physicist running your application programs, but if you are actually interested in the machine itself, the lack of access to the innards of the machine becomes quite frustrating.

The mathematics department at South Bank Polytechnic was fortunate in having acquired three years earlier the first GT11 in the country, an early version of a PDP11with graphics capability. For most of the time this machine could be used as a personal computer, and a very nice computer it was too! Gradually, however, more and more basic teaching had to be done on it and inevitably the machine became time-shared losing all of its early advantages. The powers-that-be also had the curious notion that, once you had bought a computer, there was no need to maintain or enhance it to cope with changing requirements. Even such a simple device as a floppy disk drive could not be added to enable students to look after their own data.

Page 17 of 67