Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!watmath!clyde!floyd!harpo!seismo!hao!hplabs!sri-unix!mknox@ut-ngp.ARPA From: mknox@ut-ngp.ARPA Newsgroups: net.micro.cpm Subject: SELDSK bug in CP/M-86 Message-ID: <16898@sri-arpa.UUCP> Date: Sun, 19-Feb-84 14:36:43 EST Article-I.D.: sri-arpa.16898 Posted: Sun Feb 19 14:36:43 1984 Date-Received: Fri, 2-Mar-84 12:45:39 EST Lines: 22 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.