Xref: news2.mv.net comp.os.msdos.djgpp:1220 comp.os.msdos.programmer:20878 comp.sys.ibm.pc.hardware.storage:43950 Newsgroups: comp.sys.ibm.pc.hardware.storage,comp.os.msdos.programmer,comp.os.msdos.djgpp From: kaikow AT standards DOT com Subject: _bios_disk using C to read a logical drive's sectors Originator: kaikow AT mv DOT mv DOT com Message-ID: Sender: kaikow AT standards DOT com Reply-To: kaikow AT standards DOT com Organization: MV Communications, Inc. Date: Sun, 18 Feb 1996 13:09:46 GMT Followup-To: poster Lines: 25 To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp I am having trouble finding "documentation" of how to read sectors from logical drives. It appears that I am not the only one having such problems, as I have found one shareware and one freeware disk editor that produce differing results. Alas, neither editor is in source form, so I am unable to see what they are doing. Using the DEBUG command, I can see sector 0 on each logical drive (altough I have not yet tried that with the CD-ROM drive). In addition, the DJGPP port of GNU C has a biostest.c program that has the same difficulty I am seeing. Both my program and biostest.c read the correct sector 0 from floppies but not from hard drives (yes, I am using 0x80, etc. for the hard drives). KB article Q39311 does clarify one issue, i.e., _bios_disk only accesses physical devices, not logical drives on a device, so that would explain why logical drive e: is not handled correctly. I guess that I have to grab a partition table somewhere to get drive e:'s sectors. Is there source code available to demonstrate how to read a sector from any logical drive? Somewhee on the vast WWW, there is likely source for a disk editor, guess that I'll start looking. The solution could be distributed with DJGPP.