burleigh@cica.cica.indiana.edu (Frank Burleigh) (06/11/90)
I'm looking for a procedure to determine the type of diskette a drive may contain (e.g., a media descriptor byte [360KB 5.25", 1.44MB 3.5", etc.]) whether or not the drive contains a diskette. Some possibilities and their drawbacks: 1. DOS 32h provides the needed data, but it is a) undocumented; b) doesn't work if there is no disk in the drive (and may not work if a diskette is unformatted). 2. DOS 1ch (get drive data) returns a pointer to the media byte, but again must interrogate a diskette, failing if there is no diskette or (presumably) if the diskette is unformatted. 2. ROM BIOS 13h (sub 8h) (get drive params) looks promissing: it returns a descriptor byte, but the notation in Duncan, 2nd ed. says it won't work for floppy drives on PCs and PC/XTs. In summary, I'd appreciate suggestions of/pointers to a C or C- callable assembly procedure that will identify the type of diskette a drive may contain without actually hitting a diskette. Thanks in advance for your ideas. -- Frank Burleigh burleigh@cica.cica.indiana.edu USENET: ...rutgers!iuvax!cica!burleigh BITNET: BURLEIGH@IUBACS.BITNET Department of Sociology, Indiana University, Bloomington, Indiana 47405