True drive

 BBS: Inland Empire Archive
Date: 04-24-92 (17:43)             Number: 160
From: LOGAN ASHBY                  Refer#: NONE
  To: DICK DENNISON                 Recvd: NO  
Subj: True drive                     Conf: (2) Quik_Bas
In a msg of <21 Apr 92>, Logan Ashby writes to Dick Dennison:

 DD >> one floppy and it reported A: and B: as valid removable physical
 DD >> drives.

 DD >> I have a feeling that this is something we have to live with.

 LA > thought about it some more, you can get that info from the BIOS data
 LA > area, including which letter is currently being used for the floppy
 LA > drive. (helps to avoid the nice little 'Insert disk for Drive X:'
 LA > message DOS writes to the screen) I'm going to make some changes
 LA > that should speed it up and make it more reliable.  I'll fix this
 LA > while I'm at it.

    Well, there I go shooting my mouth off again.  The changes I intended to
make involved reading the Current Directory Structures
Array. Unfortunately, what I found was the CDS Array only
contains entries for the number of drives in the LASTDRIVE
entry in the CONFIG.SYS file, or 5, whichever is greater.
This will miss Novell (and possibly other network software)
drive mappings.  So, the sub I posted last time was more
reliable.  I did come up with this little chunk of code for
detecting 'phantom' floppy drives:

 DEF SEG = 0
 NumFlops% = (PEEK(&H410) AND &HC0) \ &H40
 IF (NumFlops%) THEN
     PRINT "You have"; NumFlops% + 1; "floppy drives"
     PRINT "You have 1 floppy drive."
     CurLtr$ = CHR$(PEEK(&H504) + 65) + ":"
     PRINT "Currently being accessed as drive "; CurLtr$

    The byte at &H410 is the low order byte of the equipment list integer,
bits 6 & 7 of which indicate the number of floppies
installed - 1.  The byte at &H504 is the number of the
current drive letter used to access the floppy in a single
floppy system. (0 = A:, 1 = B:)  I tested this with an AMI
BIOS, and I would like to hear from anybody that finds one
it doesn't work with.  The last value isn't documented in
my copy of the Interrupt List (INTER29), so I'm not 100%
positive about it.

--- GoldED 2.40
 * Origin: Big Nerd's Nest (1:398/1.2)
Outer Court
Echo Basic Postings

Books at Amazon:

Back to BASIC: The History, Corruption, and Future of the Language

Hackers: Heroes of the Computer Revolution (including Tiny BASIC)

Go to: The Story of the Math Majors, Bridge Players, Engineers, Chess Wizards, Scientists and Iconoclasts who were the Hero Programmers of the Software Revolution

The Advent of the Algorithm: The Idea that Rules the World

Moths in the Machine: The Power and Perils of Programming

Mastering Visual Basic .NET