Mail Archives: djgpp/1996/02/18/09:38:31
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.
- Raw text -