mknox@ut-ngp.ARPA (02/19/84)
I just encountered a rather interesting bug in the IBM-PC BIOS implementation of CP/M-86 (found it the hard way, of course). Perform a SELDSK BIOS call (BIOS call number 9) to a disk (it doesn't matter what one), specifying that it is a 'new disk'. It will work correctly. Without doing any disk READ or WRITE functions, now do another SELDSK call for the same disk (again specifying that it is a 'new disk'). The DISK parameter block returned will UNCONDITIONALLY specify that the disk is SINGLE DENSITY!!! ----- Why would anyone do two disk selects in a row to the same drive? One case is an application program that selects a disk upon startup, and is then instructed by the user to 'log in a new diskette in that drive'. Since the density and allocation map may have changed a fresh SELDSK is necessary. Curiously, any read/write between the SELDSK function fixes the problem. Other BIOS calls do not.