Mail Archives: djgpp/2004/07/30/07:00:06
On 30 Jul 2004 00:14:39 -0700 in comp.os.msdos.djgpp,
gohyongkwang AT hotmail DOT com (Goh, Yong Kwang) wrote:
>Hi. I'm currently using _bios_disk function in a simple program to
>explore raw floppy disk content.
>
>To read an entire floppy disk, afaik, there's two way when calling the
>_bios_disk function.
>
>Method 1 is to read the entire track in a single call by specifying
>the number of sectors to read as the number of sectors per track and
>to loop thru all the tracks for an entire disk. Drawback is that it's
>impossible to identify which sector of the track is bad/unreadable
>when the function call fails.
>
>Method 2 is more fine-grained by having an additional loop that loops
>thru all the sector in a track one-by-one, reading in 1 sector per
>function call. Appears to be slower but allows the program to identify
>which specific sector is bad/unreadable.
See other post for speed comparison.
When you get a diskette error, you have to reset/recalibrate the drive
to clear it, so you might as well read full tracks for speed, then if
you get an error, reset/recalibrate, then reread the track by sector
to identify the failing sector, reset/recalibrate, try a couple more
times to make sure, finish reading the track by sector, then switch
back to full track reads.
--
Thanks. Take care, Brian Inglis Calgary, Alberta, Canada
Brian DOT Inglis AT CSi DOT com (Brian dot Inglis at SystematicSw dot ab dot ca)
fake address use address above to reply
- Raw text -